rust/src/test/ui/ref-suggestion.rs

18 lines
300 B
Rust
Raw Normal View History

2015-07-06 06:16:46 +00:00
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
2015-07-06 06:16:46 +00:00
}