summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-binding-mutbl.rs
blob: c2d2e02ec156683df3c606c0366b648610241230 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass

struct F { f: Vec<isize> }

fn impure(_v: &[isize]) {
}

pub fn main() {
    let mut x = F {f: vec![3]};

    match x {
      F {f: ref mut v} => {
        impure(v);
      }
    }
}