diff options
Diffstat (limited to 'tests/ui/threads-sendsync/trivial-message.rs')
-rw-r--r-- | tests/ui/threads-sendsync/trivial-message.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/threads-sendsync/trivial-message.rs b/tests/ui/threads-sendsync/trivial-message.rs new file mode 100644 index 000000000..5831e867b --- /dev/null +++ b/tests/ui/threads-sendsync/trivial-message.rs @@ -0,0 +1,16 @@ +// run-pass + +#![allow(unused_must_use)] +/* + This is about the simplest program that can successfully send a + message. + */ + +use std::sync::mpsc::channel; + +pub fn main() { + let (tx, rx) = channel(); + tx.send(42); + let r = rx.recv(); + println!("{:?}", r); +} |