1 error[E0658]: `loop` is not allowed in a `const`
4 LL | const _: () = loop {};
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
10 error[E0658]: `loop` is not allowed in a `static`
11 --> $DIR/loop.rs:12:19
13 LL | static FOO: i32 = loop { break 4; };
16 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
17 = help: add `#![feature(const_loop)]` to the crate attributes to enable
19 error[E0658]: `loop` is not allowed in a `const fn`
25 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
26 = help: add `#![feature(const_loop)]` to the crate attributes to enable
28 error[E0658]: `loop` is not allowed in a `const fn`
34 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
35 = help: add `#![feature(const_loop)]` to the crate attributes to enable
37 error[E0658]: `while` is not allowed in a `const`
43 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
44 = help: add `#![feature(const_loop)]` to the crate attributes to enable
45 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
47 error[E0658]: `while` is not allowed in a `const`
55 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
56 = help: add `#![feature(const_loop)]` to the crate attributes to enable
57 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
59 error[E0658]: `while` is not allowed in a `const`
67 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
68 = help: add `#![feature(const_loop)]` to the crate attributes to enable
69 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
71 error[E0744]: `for` is not allowed in a `const`
74 LL | / for i in 0..4 {
79 error[E0744]: `for` is not allowed in a `const`
82 LL | / for i in 0..4 {
87 error[E0658]: `loop` is not allowed in a `const`
98 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
99 = help: add `#![feature(const_loop)]` to the crate attributes to enable
101 error[E0658]: `if` is not allowed in a `const`
102 --> $DIR/loop.rs:79:9
109 = note: for more information, see https://github.com/rust-lang/rust/issues/49146
110 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
112 error[E0658]: `loop` is not allowed in a `const`
113 --> $DIR/loop.rs:84:5
123 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
124 = help: add `#![feature(const_loop)]` to the crate attributes to enable
126 error[E0658]: `if` is not allowed in a `const`
127 --> $DIR/loop.rs:86:9
134 = note: for more information, see https://github.com/rust-lang/rust/issues/49146
135 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
137 error[E0658]: `while` is not allowed in a `const`
138 --> $DIR/loop.rs:96:5
140 LL | while let None = Some(x) { }
141 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
143 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
144 = help: add `#![feature(const_loop)]` to the crate attributes to enable
145 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
147 error[E0658]: `while` is not allowed in a `const`
148 --> $DIR/loop.rs:97:5
150 LL | while let None = Some(x) { }
151 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
154 = help: add `#![feature(const_loop)]` to the crate attributes to enable
155 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
157 error[E0658]: `loop` is not allowed in a `const`
158 --> $DIR/loop.rs:19:22
160 LL | const BAR: i32 = loop { break 4; };
163 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
164 = help: add `#![feature(const_loop)]` to the crate attributes to enable
166 error[E0658]: `loop` is not allowed in a `const`
167 --> $DIR/loop.rs:23:22
169 LL | const BAR: i32 = loop { break 4; };
172 = note: for more information, see https://github.com/rust-lang/rust/issues/52000
173 = help: add `#![feature(const_loop)]` to the crate attributes to enable
175 error: aborting due to 17 previous errors
177 Some errors have detailed explanations: E0658, E0744.
178 For more information about an error, try `rustc --explain E0658`.