2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2014-12-23 11:53:35 -08:00
|
|
|
use std::sync::mpsc::channel;
|
2014-12-22 09:04:23 -08:00
|
|
|
|
2011-03-21 21:30:32 -04:00
|
|
|
// rustboot can't transmit nils across channels because they don't have
|
|
|
|
// any size, but rustc currently can because they do have size. Whether
|
|
|
|
// or not this is desirable I don't know, but here's a regression test.
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2014-03-09 14:58:32 -07:00
|
|
|
let (tx, rx) = channel();
|
2014-12-23 11:53:35 -08:00
|
|
|
tx.send(()).unwrap();
|
|
|
|
let n: () = rx.recv().unwrap();
|
2013-05-18 22:02:45 -04:00
|
|
|
assert_eq!(n, ());
|
2011-08-10 09:27:22 -07:00
|
|
|
}
|