about summary refs log tree commit diff
path: root/tests/ui/unique/unique-send.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unique/unique-send.rs')
-rw-r--r--tests/ui/unique/unique-send.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/unique/unique-send.rs b/tests/ui/unique/unique-send.rs
new file mode 100644
index 00000000000..431cc2be5d2
--- /dev/null
+++ b/tests/ui/unique/unique-send.rs
@@ -0,0 +1,10 @@
+// run-pass
+
+use std::sync::mpsc::channel;
+
+pub fn main() {
+    let (tx, rx) = channel::<Box<_>>();
+    tx.send(Box::new(100)).unwrap();
+    let v = rx.recv().unwrap();
+    assert_eq!(v, Box::new(100));
+}