]> git.lizzy.rs Git - rust.git/blob - src/test/ui/threads-sendsync/task-comm-chan-nil.rs
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
[rust.git] / src / test / ui / 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 }