1
- error[E0744 ]: `loop` is not allowed in a `const`
2
- --> $DIR/loop.rs:8 :15
1
+ error[E0658 ]: `loop` is not allowed in a `const`
2
+ --> $DIR/loop.rs:10 :15
3
3
|
4
4
LL | const _: () = loop {};
5
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
6
9
7
- error[E0744 ]: `loop` is not allowed in a `static`
8
- --> $DIR/loop.rs:10 :19
10
+ error[E0658 ]: `loop` is not allowed in a `static`
11
+ --> $DIR/loop.rs:12 :19
9
12
|
10
13
LL | static FOO: i32 = loop { break 4; };
11
14
| ^^^^^^^^^^^^^^^^^
15
+ |
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
12
18
13
- error[E0744 ]: `loop` is not allowed in a `const fn`
14
- --> $DIR/loop.rs:13 :5
19
+ error[E0658 ]: `loop` is not allowed in a `const fn`
20
+ --> $DIR/loop.rs:15 :5
15
21
|
16
22
LL | loop {}
17
23
| ^^^^^^^
24
+ |
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
18
27
19
- error[E0744 ]: `loop` is not allowed in a `const fn`
20
- --> $DIR/loop.rs:26 :9
28
+ error[E0658 ]: `loop` is not allowed in a `const fn`
29
+ --> $DIR/loop.rs:28 :9
21
30
|
22
31
LL | loop {}
23
32
| ^^^^^^^
33
+ |
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
24
36
25
- error[E0744 ]: `while` is not allowed in a `const`
26
- --> $DIR/loop.rs:38 :9
37
+ error[E0658 ]: `while` is not allowed in a `const`
38
+ --> $DIR/loop.rs:40 :9
27
39
|
28
40
LL | while false {}
29
41
| ^^^^^^^^^^^^^^
42
+ |
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
30
45
31
- error[E0744 ]: `while` is not allowed in a `const`
32
- --> $DIR/loop.rs:47 :5
46
+ error[E0658 ]: `while` is not allowed in a `const`
47
+ --> $DIR/loop.rs:49 :5
33
48
|
34
49
LL | / while x < 4 {
35
50
LL | | x += 1;
36
51
LL | | }
37
52
| |_____^
53
+ |
54
+ = note: for more information, see https://github.com/rust-lang/rust/issues/52000
55
+ = help: add `#![feature(const_loop)]` to the crate attributes to enable
38
56
39
- error[E0744 ]: `while` is not allowed in a `const`
40
- --> $DIR/loop.rs:51 :5
57
+ error[E0658 ]: `while` is not allowed in a `const`
58
+ --> $DIR/loop.rs:53 :5
41
59
|
42
60
LL | / while x < 8 {
43
61
LL | | x += 1;
44
62
LL | | }
45
63
| |_____^
64
+ |
65
+ = note: for more information, see https://github.com/rust-lang/rust/issues/52000
66
+ = help: add `#![feature(const_loop)]` to the crate attributes to enable
46
67
47
68
error[E0744]: `for` is not allowed in a `const`
48
- --> $DIR/loop.rs:61 :5
69
+ --> $DIR/loop.rs:63 :5
49
70
|
50
71
LL | / for i in 0..4 {
51
72
LL | | x += i;
52
73
LL | | }
53
74
| |_____^
54
75
55
76
error[E0744]: `for` is not allowed in a `const`
56
- --> $DIR/loop.rs:65 :5
77
+ --> $DIR/loop.rs:67 :5
57
78
|
58
79
LL | / for i in 0..4 {
59
80
LL | | x += i;
60
81
LL | | }
61
82
| |_____^
62
83
63
- error[E0744 ]: `loop` is not allowed in a `const`
64
- --> $DIR/loop.rs:75 :5
84
+ error[E0658 ]: `loop` is not allowed in a `const`
85
+ --> $DIR/loop.rs:77 :5
65
86
|
66
87
LL | / loop {
67
88
LL | | x += 1;
@@ -70,9 +91,12 @@ LL | | break;
70
91
LL | | }
71
92
LL | | }
72
93
| |_____^
94
+ |
95
+ = note: for more information, see https://github.com/rust-lang/rust/issues/52000
96
+ = help: add `#![feature(const_loop)]` to the crate attributes to enable
73
97
74
- error[E0744 ]: `loop` is not allowed in a `const`
75
- --> $DIR/loop.rs:82 :5
98
+ error[E0658 ]: `loop` is not allowed in a `const`
99
+ --> $DIR/loop.rs:84 :5
76
100
|
77
101
LL | / loop {
78
102
LL | | x += 1;
@@ -81,31 +105,47 @@ LL | | break;
81
105
LL | | }
82
106
LL | | }
83
107
| |_____^
108
+ |
109
+ = note: for more information, see https://github.com/rust-lang/rust/issues/52000
110
+ = help: add `#![feature(const_loop)]` to the crate attributes to enable
84
111
85
- error[E0744 ]: `while` is not allowed in a `const`
86
- --> $DIR/loop.rs:94 :5
112
+ error[E0658 ]: `while` is not allowed in a `const`
113
+ --> $DIR/loop.rs:96 :5
87
114
|
88
115
LL | while let None = Some(x) { }
89
116
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117
+ |
118
+ = note: for more information, see https://github.com/rust-lang/rust/issues/52000
119
+ = help: add `#![feature(const_loop)]` to the crate attributes to enable
90
120
91
- error[E0744 ]: `while` is not allowed in a `const`
92
- --> $DIR/loop.rs:95 :5
121
+ error[E0658 ]: `while` is not allowed in a `const`
122
+ --> $DIR/loop.rs:97 :5
93
123
|
94
124
LL | while let None = Some(x) { }
95
125
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126
+ |
127
+ = note: for more information, see https://github.com/rust-lang/rust/issues/52000
128
+ = help: add `#![feature(const_loop)]` to the crate attributes to enable
96
129
97
- error[E0744 ]: `loop` is not allowed in a `const`
98
- --> $DIR/loop.rs:17 :22
130
+ error[E0658 ]: `loop` is not allowed in a `const`
131
+ --> $DIR/loop.rs:19 :22
99
132
|
100
133
LL | const BAR: i32 = loop { break 4; };
101
134
| ^^^^^^^^^^^^^^^^^
135
+ |
136
+ = note: for more information, see https://github.com/rust-lang/rust/issues/52000
137
+ = help: add `#![feature(const_loop)]` to the crate attributes to enable
102
138
103
- error[E0744 ]: `loop` is not allowed in a `const`
104
- --> $DIR/loop.rs:21 :22
139
+ error[E0658 ]: `loop` is not allowed in a `const`
140
+ --> $DIR/loop.rs:23 :22
105
141
|
106
142
LL | const BAR: i32 = loop { break 4; };
107
143
| ^^^^^^^^^^^^^^^^^
144
+ |
145
+ = note: for more information, see https://github.com/rust-lang/rust/issues/52000
146
+ = help: add `#![feature(const_loop)]` to the crate attributes to enable
108
147
109
148
error: aborting due to 15 previous errors
110
149
111
- For more information about this error, try `rustc --explain E0744`.
150
+ Some errors have detailed explanations: E0658, E0744.
151
+ For more information about an error, try `rustc --explain E0658`.
0 commit comments