]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/moves-based-on-type-capture-clause-bad.rs
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / moves / moves-based-on-type-capture-clause-bad.rs
1 use std::thread;
2
3 fn main() {
4     let x = "Hello world!".to_string();
5     thread::spawn(move|| {
6         println!("{}", x);
7     });
8     println!("{}", x); //~ ERROR borrow of moved value
9 }