]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-4448.rs
Merge commit '7bfc26ec8e7a454786668e7e52ffe527fc649735' into clippyup
[rust.git] / src / test / ui / issues / issue-4448.rs
1 // run-pass
2 // ignore-emscripten no threads support
3
4 use std::sync::mpsc::channel;
5 use std::thread;
6
7 pub fn main() {
8     let (tx, rx) = channel::<&'static str>();
9
10     let t = thread::spawn(move|| {
11         assert_eq!(rx.recv().unwrap(), "hello, world");
12     });
13
14     tx.send("hello, world").unwrap();
15     t.join().ok().unwrap();
16 }