]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issue-51714.rs
Fix another return-const ICE
[rust.git] / src / test / ui / issue-51714.rs
index c0e62dcc9cefe3e007645cf8903e72dc41f5cf72..f8d12b991eaef37d8752c4693d81a5cbda741ee4 100644 (file)
@@ -9,16 +9,15 @@
 // except according to those terms.
 
 fn main() {
-    |_:  [_; return || {}] | {}
+    |_:  [_; return || {}] | {};
     //~^ ERROR return statement outside of function body
-}
 
-fn foo() {
     [(); return || {}];
     //~^ ERROR return statement outside of function body
-}
 
-fn bar() {
     [(); return |ice| {}];
     //~^ ERROR return statement outside of function body
+
+    [(); return while let Some(n) = Some(0) {}];
+    //~^ ERROR return statement outside of function body
 }