1 error[E0382]: borrow of moved value: `x`
2 --> $DIR/moves-based-on-type-capture-clause-bad.rs:8:20
4 LL | let x = "Hello world!".to_string();
5 | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
6 LL | thread::spawn(move|| {
7 | ------ value moved into closure here
8 LL | println!("{}", x);
9 | - variable moved due to use in closure
11 LL | println!("{}", x); //~ ERROR use of moved value
12 | ^ value borrowed here after move
14 error: aborting due to previous error
16 For more information about this error, try `rustc --explain E0382`.