]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/regions-out-of-scope-slice.rs
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / 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() {}