]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-use-in-index-lvalue.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / borrowck-use-in-index-lvalue.rs
1 fn test() {
2     let w: &mut [isize];
3     w[5] = 0; //~ ERROR [E0381]
4
5     let mut w: &mut [isize];
6     w[5] = 0; //~ ERROR [E0381]
7 }
8
9 fn main() { test(); }