]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/suggest-storing-local-var-for-vector.rs
Rollup merge of #99460 - JanBeh:PR_asref_asmut_docs, r=joshtriplett
[rust.git] / src / test / ui / borrowck / suggest-storing-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 }