afcb938116
This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495). Co-Authored-By: Sebastian Malton <sebastian@malton.name>
36 lines
1023 B
Plaintext
36 lines
1023 B
Plaintext
error[E0572]: return statement outside of function body
|
|
--> $DIR/issue-51714.rs:2:14
|
|
|
|
|
LL | |_: [_; return || {}] | {};
|
|
| ^^^^^^^^^^^^
|
|
|
|
error[E0572]: return statement outside of function body
|
|
--> $DIR/issue-51714.rs:5:10
|
|
|
|
|
LL | [(); return || {}];
|
|
| ^^^^^^^^^^^^
|
|
|
|
error[E0572]: return statement outside of function body
|
|
--> $DIR/issue-51714.rs:8:10
|
|
|
|
|
LL | [(); return |ice| {}];
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error[E0572]: return statement outside of function body
|
|
--> $DIR/issue-51714.rs:11:10
|
|
|
|
|
LL | [(); return while let Some(n) = Some(0) {}];
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
warning: irrefutable while-let pattern
|
|
--> $DIR/issue-51714.rs:11:17
|
|
|
|
|
LL | [(); return while let Some(n) = Some(0) {}];
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: #[warn(irrefutable_let_patterns)] on by default
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0572`.
|