]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/control-flow/loop.stock.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / consts / control-flow / loop.stock.stderr
1 error[E0658]: `loop` is not allowed in a `const`
2 --> $DIR/loop.rs:10:15
3 |
4 LL | const _: () = loop {};
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
9
10 error[E0658]: `loop` is not allowed in a `static`
11 --> $DIR/loop.rs:12:19
12 |
13 LL | static FOO: i32 = loop { break 4; };
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
18
19 error[E0658]: `loop` is not allowed in a `const fn`
20 --> $DIR/loop.rs:15:5
21 |
22 LL | loop {}
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
27
28 error[E0658]: `loop` is not allowed in a `const fn`
29 --> $DIR/loop.rs:28:9
30 |
31 LL | loop {}
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
36
37 error[E0658]: `while` is not allowed in a `const`
38 --> $DIR/loop.rs:40:9
39 |
40 LL | while false {}
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
45 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
46
47 error[E0658]: `while` is not allowed in a `const`
48 --> $DIR/loop.rs:49:5
49 |
50 LL | / while x < 4 {
51 LL | | x += 1;
52 LL | | }
53 | |_____^
54 |
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
58
59 error[E0658]: `while` is not allowed in a `const`
60 --> $DIR/loop.rs:53:5
61 |
62 LL | / while x < 8 {
63 LL | | x += 1;
64 LL | | }
65 | |_____^
66 |
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
70
71 error[E0744]: `for` is not allowed in a `const`
72 --> $DIR/loop.rs:63:5
73 |
74 LL | / for i in 0..4 {
75 LL | | x += i;
76 LL | | }
77 | |_____^
78
79 error[E0744]: `for` is not allowed in a `const`
80 --> $DIR/loop.rs:67:5
81 |
82 LL | / for i in 0..4 {
83 LL | | x += i;
84 LL | | }
85 | |_____^
86
87 error[E0658]: `loop` is not allowed in a `const`
88 --> $DIR/loop.rs:77:5
89 |
90 LL | / loop {
91 LL | | x += 1;
92 LL | | if x == 4 {
93 LL | | break;
94 LL | | }
95 LL | | }
96 | |_____^
97 |
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
100
101 error[E0658]: `if` is not allowed in a `const`
102 --> $DIR/loop.rs:79:9
103 |
104 LL | / if x == 4 {
105 LL | | break;
106 LL | | }
107 | |_________^
108 |
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
111
112 error[E0658]: `loop` is not allowed in a `const`
113 --> $DIR/loop.rs:84:5
114 |
115 LL | / loop {
116 LL | | x += 1;
117 LL | | if x == 8 {
118 LL | | break;
119 LL | | }
120 LL | | }
121 | |_____^
122 |
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
125
126 error[E0658]: `if` is not allowed in a `const`
127 --> $DIR/loop.rs:86:9
128 |
129 LL | / if x == 8 {
130 LL | | break;
131 LL | | }
132 | |_________^
133 |
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
136
137 error[E0658]: `while` is not allowed in a `const`
138 --> $DIR/loop.rs:96:5
139 |
140 LL | while let None = Some(x) { }
141 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142 |
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
146
147 error[E0658]: `while` is not allowed in a `const`
148 --> $DIR/loop.rs:97:5
149 |
150 LL | while let None = Some(x) { }
151 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
152 |
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
156
157 error[E0658]: `loop` is not allowed in a `const`
158 --> $DIR/loop.rs:19:22
159 |
160 LL | const BAR: i32 = loop { break 4; };
161 | ^^^^^^^^^^^^^^^^^
162 |
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
165
166 error[E0658]: `loop` is not allowed in a `const`
167 --> $DIR/loop.rs:23:22
168 |
169 LL | const BAR: i32 = loop { break 4; };
170 | ^^^^^^^^^^^^^^^^^
171 |
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
174
175 error: aborting due to 17 previous errors
176
177 Some errors have detailed explanations: E0658, E0744.
178 For more information about an error, try `rustc --explain E0658`.