about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/ui/weird-exprs.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/weird-exprs.rs b/src/test/ui/weird-exprs.rs
index fb8b32e2803..c7ee9c7334a 100644
--- a/src/test/ui/weird-exprs.rs
+++ b/src/test/ui/weird-exprs.rs
@@ -1,6 +1,8 @@
 // run-pass
 
 #![feature(generators)]
+#![feature(destructuring_assignment)]
+#![feature(unboxed_closures, fn_traits)]
 
 #![allow(non_camel_case_types)]
 #![allow(dead_code)]
@@ -172,6 +174,17 @@ fn unicode() {
     }, '🤔');
 }
 
+fn function() {
+    struct foo;
+    impl FnOnce<()> for foo {
+        type Output = foo;
+        extern "rust-call" fn call_once(self, _args: ()) -> Self::Output {
+            foo
+        }
+    }
+    let foo = foo () ()() ()()() ()()()() ()()()()();
+}
+
 fn bathroom_stall() {
     let mut i = 1;
     matches!(2, _|_|_|_|_|_ if (i+=1) != (i+=1));
@@ -198,5 +211,6 @@ pub fn main() {
     match_nested_if();
     monkey_barrel();
     unicode();
+    function();
     bathroom_stall();
 }