fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
1.2 KiB38 linesraw
1error[E0658]: `while` is not allowed in a `const`
2  --> $DIR/issue-51714.rs:11:17
3   |
4LL |     [(); return while let Some(n) = Some(0) {}];
5   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6   |
7   = note: for more information, see https://github.com/rust-lang/rust/issues/52000
8   = help: add `#![feature(const_loop)]` to the crate attributes to enable
9   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
10
11error[E0572]: return statement outside of function body
12  --> $DIR/issue-51714.rs:2:14
13   |
14LL |     |_:  [_; return || {}] | {};
15   |              ^^^^^^^^^^^^
16
17error[E0572]: return statement outside of function body
18  --> $DIR/issue-51714.rs:5:10
19   |
20LL |     [(); return || {}];
21   |          ^^^^^^^^^^^^
22
23error[E0572]: return statement outside of function body
24  --> $DIR/issue-51714.rs:8:10
25   |
26LL |     [(); return |ice| {}];
27   |          ^^^^^^^^^^^^^^^
28
29error[E0572]: return statement outside of function body
30  --> $DIR/issue-51714.rs:11:10
31   |
32LL |     [(); return while let Some(n) = Some(0) {}];
33   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34
35error: aborting due to 5 previous errors
36
37Some errors have detailed explanations: E0572, E0658.
38For more information about an error, try `rustc --explain E0572`.