]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-use-in-index-lvalue.rs
Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gcc
[rust.git] / src / test / 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(); }