rust/src/test/ui/ref-suggestion.rs
2019-04-22 08:40:08 +01:00

17 lines
300 B
Rust

fn main() {
let x = vec![1];
let y = x;
x; //~ ERROR use of moved value
let x = vec![1];
let mut y = x;
x; //~ ERROR use of moved value
let x = (Some(vec![1]), ());
match x {
(Some(y), ()) => {},
_ => {},
}
x; //~ ERROR use of moved value
}