rust/tests/ui/borrowck/borrowck-binding-mutbl.rs
2023-01-11 09:32:08 +00:00

17 lines
196 B
Rust

// 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);
}
}
}