rust/src/test/ui/issues/issue-51714.stderr
2019-12-13 10:39:14 -08:00

39 lines
1.2 KiB
Plaintext

error[E0658]: `while` is not allowed in a `const`
--> $DIR/issue-51714.rs:11:17
|
LL | [(); return while let Some(n) = Some(0) {}];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/52000
= help: add `#![feature(const_loop)]` to the crate attributes to enable
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
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) {}];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors
Some errors have detailed explanations: E0572, E0658.
For more information about an error, try `rustc --explain E0572`.