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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
197 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 19:34:08 +00:00
match x {
F {f: ref mut v} => {
impure(v);
}
}
}