Files
rust/tests/ui/lifetimes/array-pattern-matching-10396.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
250 B
Rust
Raw Normal View History

2025-07-18 22:06:07 +05:00
//! Regression test for https://github.com/rust-lang/rust/issues/10396
//@ check-pass
#![allow(dead_code)]
2015-01-28 08:34:18 -05:00
#[derive(Debug)]
2014-11-03 00:58:00 +01:00
enum Foo<'s> {
V(&'s str)
}
fn f(arr: &[&Foo]) {
2015-01-31 12:20:46 -05:00
for &f in arr {
println!("{:?}", f);
2014-11-03 00:58:00 +01:00
}
}
fn main() {}