summaryrefslogtreecommitdiffstats
path: root/src/test/ui/threads-sendsync/trivial-message.rs
blob: 5831e867be57754a417e526c51e89f1bcc22aacb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
}