fork/rust

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

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

1.42.0
3.3 KiB96 linesraw
1error[E0658]: `while` is not allowed in a `const`
2  --> $DIR/loop.rs:40:9
3   |
4LL |         while false {}
5   |         ^^^^^^^^^^^^^^
6   |
7   = note: for more information, see https://github.com/rust-lang/rust/issues/49146
8   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
9   = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional
10
11error[E0658]: `while` is not allowed in a `const`
12  --> $DIR/loop.rs:49:5
13   |
14LL | /     while x < 4 {
15LL | |         x += 1;
16LL | |     }
17   | |_____^
18   |
19   = note: for more information, see https://github.com/rust-lang/rust/issues/49146
20   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
21   = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional
22
23error[E0658]: `while` is not allowed in a `const`
24  --> $DIR/loop.rs:53:5
25   |
26LL | /     while x < 8 {
27LL | |         x += 1;
28LL | |     }
29   | |_____^
30   |
31   = note: for more information, see https://github.com/rust-lang/rust/issues/49146
32   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
33   = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional
34
35error[E0744]: `for` is not allowed in a `const`
36  --> $DIR/loop.rs:63:5
37   |
38LL | /     for i in 0..4 {
39LL | |         x += i;
40LL | |     }
41   | |_____^
42
43error[E0744]: `for` is not allowed in a `const`
44  --> $DIR/loop.rs:67:5
45   |
46LL | /     for i in 0..4 {
47LL | |         x += i;
48LL | |     }
49   | |_____^
50
51error[E0658]: `if` is not allowed in a `const`
52  --> $DIR/loop.rs:79:9
53   |
54LL | /         if x == 4 {
55LL | |             break;
56LL | |         }
57   | |_________^
58   |
59   = note: for more information, see https://github.com/rust-lang/rust/issues/49146
60   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
61
62error[E0658]: `if` is not allowed in a `const`
63  --> $DIR/loop.rs:86:9
64   |
65LL | /         if x == 8 {
66LL | |             break;
67LL | |         }
68   | |_________^
69   |
70   = note: for more information, see https://github.com/rust-lang/rust/issues/49146
71   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
72
73error[E0658]: `while` is not allowed in a `const`
74  --> $DIR/loop.rs:96:5
75   |
76LL |     while let None = Some(x) { }
77   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78   |
79   = note: for more information, see https://github.com/rust-lang/rust/issues/49146
80   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
81   = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional
82
83error[E0658]: `while` is not allowed in a `const`
84  --> $DIR/loop.rs:97:5
85   |
86LL |     while let None = Some(x) { }
87   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88   |
89   = note: for more information, see https://github.com/rust-lang/rust/issues/49146
90   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
91   = note: `#![feature(const_loop)]` alone is not sufficient, since this loop expression contains an implicit conditional
92
93error: aborting due to 9 previous errors
94
95Some errors have detailed explanations: E0658, E0744.
96For more information about an error, try `rustc --explain E0658`.