]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/suggest-local-var-for-vector.rs
Rollup merge of #102245 - ink-feather-org:const_cmp_by, r=fee1-dead
[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 }