about summary refs log tree commit diff
path: root/tests/ui/moves/moves-based-on-type-capture-clause.rs
blob: 46759f664681858d78c33908510ea0101eb15678 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ run-pass
#![allow(unused_must_use)]
//@ needs-threads

use std::thread;

pub fn main() {
    let x = "Hello world!".to_string();
    thread::spawn(move|| {
        println!("{}", x);
    }).join();
}