]> git.proxmox.com Git - rustc.git/blob - src/test/run-pass/threads-sendsync/task-comm-chan-nil.rs
New upstream version 1.37.0+dfsg1
[rustc.git] / src / test / run-pass / threads-sendsync / task-comm-chan-nil.rs
1 // run-pass
2
3 use std::sync::mpsc::channel;
4
5 // rustboot can't transmit nils across channels because they don't have
6 // any size, but rustc currently can because they do have size. Whether
7 // or not this is desirable I don't know, but here's a regression test.
8 pub fn main() {
9 let (tx, rx) = channel();
10 tx.send(()).unwrap();
11 let n: () = rx.recv().unwrap();
12 assert_eq!(n, ());
13 }