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 `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);
12 | ^ value borrowed here after move
14 = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
16 error: aborting due to previous error
18 For more information about this error, try `rustc --explain E0382`.