rust/tests/ui/use/use-after-move-based-on-type.rs
2023-01-11 09:32:08 +00:00

6 lines
119 B
Rust

fn main() {
let x = "Hello!".to_string();
let _y = x;
println!("{}", x); //~ ERROR borrow of moved value
}