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