summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-20454.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-20454.rs')
-rw-r--r--tests/ui/issues/issue-20454.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-20454.rs b/tests/ui/issues/issue-20454.rs
new file mode 100644
index 000000000..46cae33f1
--- /dev/null
+++ b/tests/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() {}