rust/src/test/ui/trivial-message.rs
2019-07-27 18:56:16 +03:00

17 lines
269 B
Rust

// 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);
}