summaryrefslogtreecommitdiffstats
path: root/src/test/ui/borrowck/borrowck-use-in-index-lvalue.rs
blob: d30b1de5cd00f9f5b6a8afbd714b8ceafdb72b84 (plain)
1
2
3
4
5
6
7
8
9
fn test() {
    let w: &mut [isize];
    w[5] = 0; //~ ERROR [E0381]

    let mut w: &mut [isize];
    w[5] = 0; //~ ERROR [E0381]
}

fn main() { test(); }