1 #![feature(box_syntax)]
3 use std::sync::mpsc::channel;
6 let (tx, rx) = channel::<Box<_>>();
7 tx.send(box 100).unwrap();
8 let v = rx.recv().unwrap();
9 assert_eq!(v, box 100);
11 tx.send(box 101).unwrap();
12 tx.send(box 102).unwrap();
13 assert_eq!(rx.recv().unwrap(), box 101);
14 assert_eq!(rx.recv().unwrap(), box 102);