summaryrefslogtreecommitdiffstats
path: root/src/test/ui/threads-sendsync/task-comm-17.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/threads-sendsync/task-comm-17.rs')
-rw-r--r--src/test/ui/threads-sendsync/task-comm-17.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/threads-sendsync/task-comm-17.rs b/src/test/ui/threads-sendsync/task-comm-17.rs
new file mode 100644
index 000000000..722497870
--- /dev/null
+++ b/src/test/ui/threads-sendsync/task-comm-17.rs
@@ -0,0 +1,17 @@
+// run-pass
+#![allow(unused_must_use)]
+// ignore-emscripten no threads support
+// pretty-expanded FIXME #23616
+
+// Issue #922
+
+// This test is specifically about spawning temporary closures.
+
+use std::thread;
+
+fn f() {
+}
+
+pub fn main() {
+ thread::spawn(move|| f() ).join();
+}