rust/src/test/ui/issues/issue-51714.stderr
varkor afcb938116 Stabilise irrefutable if-let and while-let patterns
This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495).

Co-Authored-By: Sebastian Malton <sebastian@malton.name>
2019-01-12 03:10:59 +00:00

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`.