]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/suggest-local-var-for-vector.rs
Rollup merge of #102500 - compiler-errors:parse-sess-cleanup, r=cjgillot
[rust.git] / src / test / ui / borrowck / suggest-local-var-for-vector.rs
1 fn main() {
2     let mut vec = vec![0u32; 420];
3     vec[vec.len() - 1] = 123; //~ ERROR cannot borrow `vec` as immutable because it is also borrowed as mutable
4 }