]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/parser/regions-out-of-scope-slice.rs
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / test / ui / parser / regions-out-of-scope-slice.rs
index 21369d0be61b1f20badd9dbb1877ce9b40a84160..d223619e1de9ed3bdb23d80dc9ad9f9260b04874 100644 (file)
@@ -4,7 +4,7 @@ fn foo(cond: bool) {
     let mut x;
 
     if cond {
-        x = &'blk [1,2,3]; //~ ERROR expected `:`, found `[`
+        x = &'blk [1,2,3]; //~ ERROR borrow expressions cannot be annotated with lifetimes
     }
 }