summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/suggest-local-var-for-vector.rs
blob: 40f013f6a78a767c4b4e7df041a683907e484448 (plain)
1
2
3
4
fn main() {
    let mut vec = vec![0u32; 420];
    vec[vec.len() - 1] = 123; //~ ERROR cannot borrow `vec` as immutable because it is also borrowed as mutable
}