]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/regions-out-of-scope-slice.rs
Add 'compiler/rustc_codegen_cranelift/' from commit '793d26047f994e23415f8f6bb5686ff2...
[rust.git] / src / test / ui / parser / regions-out-of-scope-slice.rs
1 // This basically tests the parser's recovery on `'blk` in the wrong place.
2
3 fn foo(cond: bool) {
4     let mut x;
5
6     if cond {
7         x = &'blk [1,2,3]; //~ ERROR borrow expressions cannot be annotated with lifetimes
8     }
9 }
10
11 fn main() {}