rust/tests/ui/borrowck/borrowck-binding-mutbl.rs

17 lines
196 B
Rust
Raw Normal View History

// run-pass
struct F { f: Vec<isize> }
fn impure(_v: &[isize]) {
}
pub fn main() {
let mut x = F {f: vec![3]};
2012-08-06 14:34:08 -05:00
match x {
F {f: ref mut v} => {
impure(v);
}
}
}