summary refs log tree commit diff
path: root/src/test/ui/writing-to-immutable-vec.rs
blob: ad2bf33fc20ba08867e2f250702e2beed901b4a7 (plain)
1
2
3
4
fn main() {
    let v: Vec<isize> = vec![1, 2, 3];
    v[1] = 4; //~ ERROR cannot borrow immutable local variable `v` as mutable
}