]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/regions-out-of-scope-slice.rs
Rollup merge of #57368 - petrhosek:cmake-compiler-launcher, r=alexcrichton
[rust.git] / src / test / ui / parser / regions-out-of-scope-slice.rs
1 // blk region isn't supported in the front-end
2
3 fn foo(cond: bool) {
4     // Here we will infer a type that uses the
5     // region of the if stmt then block, but in the scope:
6     let mut x;
7
8     if cond {
9         x = &'blk [1,2,3]; //~ ERROR expected `:`, found `[`
10     }
11 }
12
13 fn main() {}