summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-20454.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-20454.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-20454.rs b/src/test/ui/issues/issue-20454.rs
new file mode 100644
index 000000000..46cae33f1
--- /dev/null
+++ b/src/test/ui/issues/issue-20454.rs
@@ -0,0 +1,13 @@
+// check-pass
+#![allow(unused_must_use)]
+use std::thread;
+
+fn _foo() {
+ thread::spawn(move || { // no need for -> ()
+ loop {
+ println!("hello");
+ }
+ }).join();
+}
+
+fn main() {}