]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-17068.rs
Enable full revision in const generics ui tests
[rust.git] / src / test / ui / issues / issue-17068.rs
1 // run-pass
2 // Test that regionck creates the right region links in the pattern
3 // binding of a for loop
4
5 fn foo<'a>(v: &'a [usize]) -> &'a usize {
6     for &ref x in v { return x; }
7     unreachable!()
8 }
9
10 fn main() {
11     assert_eq!(foo(&[0]), &0);
12 }