]>
git.proxmox.com Git - rustc.git/blob - tests/ui/box/unit/unique-send-2.rs
2 #![allow(unused_must_use)]
3 // ignore-emscripten no threads support
5 use std
::sync
::mpsc
::{channel, Sender}
;
8 fn child(tx
: &Sender
<Box
<usize>>, i
: usize) {
9 tx
.send(Box
::new(i
)).unwrap();
13 let (tx
, rx
) = channel();
16 let ts
= (0..n
).map(|i
| {
19 thread
::spawn(move|| {
22 }).collect
::<Vec
<_
>>();
26 let j
= rx
.recv().unwrap();
30 assert_eq
!(expected
, actual
);
32 for t
in ts { t.join(); }