blob: fe2c1a34bb4aef7e1c1fa98af2dce69cd018d933 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// run-pass
// Test that regionck creates the right region links in the pattern
// binding of a for loop
fn foo<'a>(v: &'a [usize]) -> &'a usize {
for &ref x in v { return x; }
unreachable!()
}
fn main() {
assert_eq!(foo(&[0]), &0);
}
|