]> git.lizzy.rs Git - rust.git/blob - src/test/ui/writing-to-immutable-vec.rs
Rollup merge of #100396 - chenyukang:fix-100394, r=petrochenkov
[rust.git] / src / test / ui / writing-to-immutable-vec.rs
1 fn main() {
2     let v: Vec<isize> = vec![1, 2, 3];
3     v[1] = 4; //~ ERROR cannot borrow `v` as mutable, as it is not declared as mutable
4 }