about summary refs log tree commit diff
path: root/tests/ui/moves/moves-based-on-type-capture-clause-bad.fixed
blob: 04a183ca96be4258afb0bca16fd619764194b07b (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ run-rustfix
use std::thread;

fn main() {
    let x = "Hello world!".to_string();
    let value = x.clone();
    thread::spawn(move || {
        println!("{}", value);
    });
    println!("{}", x); //~ ERROR borrow of moved value
}