summary refs log tree commit diff
path: root/src/test/compile-fail/borrowck-binding-mutbl.rs
blob: c8ed3f143df4092809347610e35dd7b2a93caf90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
fn impure(_v: &[int]) {
}

fn main() {
    let x = {mut f: ~[3]};

    match x {
      {f: ref mut v} => {
        impure(*v); //~ ERROR illegal borrow unless pure
        //~^ NOTE impure due to access to impure function
      }
    }
}