blob: 3d739f4d2b41b0fade374313c71412f2a0ee0f21 [file] [log] [blame]
Matthew Maurerf4d8f812020-03-27 13:14:30 -07001error[E0658]: `while` is not allowed in a `const`
2 --> $DIR/loop.rs:40:9
3 |
4LL | while false {}
5 | ^^^^^^^^^^^^^^
6 |
Matthew Maurer15a65602020-04-24 14:05:21 -07007 = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
Matthew Maurerf4d8f812020-03-27 13:14:30 -07008 = 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 |
Matthew Maurer15a65602020-04-24 14:05:21 -070019 = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
Matthew Maurerf4d8f812020-03-27 13:14:30 -070020 = 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 |
Matthew Maurer15a65602020-04-24 14:05:21 -070031 = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
Matthew Maurerf4d8f812020-03-27 13:14:30 -070032 = 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 |
Matthew Maurer15a65602020-04-24 14:05:21 -070059 = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
Matthew Maurerf4d8f812020-03-27 13:14:30 -070060 = 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 |
Matthew Maurer15a65602020-04-24 14:05:21 -070070 = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
Matthew Maurerf4d8f812020-03-27 13:14:30 -070071 = 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 |
Matthew Maurer15a65602020-04-24 14:05:21 -070079 = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
Matthew Maurerf4d8f812020-03-27 13:14:30 -070080 = 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 |
Matthew Maurer15a65602020-04-24 14:05:21 -070089 = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
Matthew Maurerf4d8f812020-03-27 13:14:30 -070090 = 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`.