@@ -169,7 +169,7 @@ LL | const fn foo30_4(b: bool) -> usize { if b { 1 } else { 42 } }
169
169
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
170
170
= help: add #![feature(const_fn)] to the crate attributes to enable
171
171
172
- error[E0723]: loops and conditional expressions are not stable in const fn
172
+ error[E0723]: loops are not allowed in const fn
173
173
--> $DIR/min_const_fn.rs:102:29
174
174
|
175
175
LL | const fn foo30_5(b: bool) { while b { } }
@@ -179,7 +179,7 @@ LL | const fn foo30_5(b: bool) { while b { } }
179
179
= help: add #![feature(const_fn)] to the crate attributes to enable
180
180
181
181
error[E0723]: loops and conditional expressions are not stable in const fn
182
- --> $DIR/min_const_fn.rs:104 :44
182
+ --> $DIR/min_const_fn.rs:105 :44
183
183
|
184
184
LL | const fn foo36(a: bool, b: bool) -> bool { a && b }
185
185
| ^^^^^^
@@ -188,7 +188,7 @@ LL | const fn foo36(a: bool, b: bool) -> bool { a && b }
188
188
= help: add #![feature(const_fn)] to the crate attributes to enable
189
189
190
190
error[E0723]: loops and conditional expressions are not stable in const fn
191
- --> $DIR/min_const_fn.rs:106 :44
191
+ --> $DIR/min_const_fn.rs:107 :44
192
192
|
193
193
LL | const fn foo37(a: bool, b: bool) -> bool { a || b }
194
194
| ^^^^^^
@@ -197,7 +197,7 @@ LL | const fn foo37(a: bool, b: bool) -> bool { a || b }
197
197
= help: add #![feature(const_fn)] to the crate attributes to enable
198
198
199
199
error[E0723]: mutable references in const fn are unstable
200
- --> $DIR/min_const_fn.rs:108 :14
200
+ --> $DIR/min_const_fn.rs:109 :14
201
201
|
202
202
LL | const fn inc(x: &mut i32) { *x += 1 }
203
203
| ^
@@ -206,7 +206,7 @@ LL | const fn inc(x: &mut i32) { *x += 1 }
206
206
= help: add #![feature(const_fn)] to the crate attributes to enable
207
207
208
208
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
209
- --> $DIR/min_const_fn.rs:113 :6
209
+ --> $DIR/min_const_fn.rs:114 :6
210
210
|
211
211
LL | impl<T: std::fmt::Debug> Foo<T> {
212
212
| ^
@@ -215,7 +215,7 @@ LL | impl<T: std::fmt::Debug> Foo<T> {
215
215
= help: add #![feature(const_fn)] to the crate attributes to enable
216
216
217
217
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
218
- --> $DIR/min_const_fn.rs:118 :6
218
+ --> $DIR/min_const_fn.rs:119 :6
219
219
|
220
220
LL | impl<T: std::fmt::Debug + Sized> Foo<T> {
221
221
| ^
@@ -224,7 +224,7 @@ LL | impl<T: std::fmt::Debug + Sized> Foo<T> {
224
224
= help: add #![feature(const_fn)] to the crate attributes to enable
225
225
226
226
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
227
- --> $DIR/min_const_fn.rs:123 :6
227
+ --> $DIR/min_const_fn.rs:124 :6
228
228
|
229
229
LL | impl<T: Sync + Sized> Foo<T> {
230
230
| ^
@@ -233,7 +233,7 @@ LL | impl<T: Sync + Sized> Foo<T> {
233
233
= help: add #![feature(const_fn)] to the crate attributes to enable
234
234
235
235
error[E0723]: `impl Trait` in const fn is unstable
236
- --> $DIR/min_const_fn.rs:129 :24
236
+ --> $DIR/min_const_fn.rs:130 :24
237
237
|
238
238
LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> { AlanTuring(0) }
239
239
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -242,7 +242,7 @@ LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> { AlanTuring(0) }
242
242
= help: add #![feature(const_fn)] to the crate attributes to enable
243
243
244
244
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
245
- --> $DIR/min_const_fn.rs:131 :34
245
+ --> $DIR/min_const_fn.rs:132 :34
246
246
|
247
247
LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
248
248
| ^^^^^^^^^^^^^^^^^^^^
@@ -251,7 +251,7 @@ LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
251
251
= help: add #![feature(const_fn)] to the crate attributes to enable
252
252
253
253
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
254
- --> $DIR/min_const_fn.rs:133 :22
254
+ --> $DIR/min_const_fn.rs:134 :22
255
255
|
256
256
LL | const fn no_apit(_x: impl std::fmt::Debug) {}
257
257
| ^^^^^^^^^^^^^^^^^^^^
@@ -260,7 +260,7 @@ LL | const fn no_apit(_x: impl std::fmt::Debug) {}
260
260
= help: add #![feature(const_fn)] to the crate attributes to enable
261
261
262
262
error[E0723]: `impl Trait` in const fn is unstable
263
- --> $DIR/min_const_fn.rs:134 :23
263
+ --> $DIR/min_const_fn.rs:135 :23
264
264
|
265
265
LL | const fn no_rpit() -> impl std::fmt::Debug {}
266
266
| ^^^^^^^^^^^^^^^^^^^^
@@ -269,7 +269,7 @@ LL | const fn no_rpit() -> impl std::fmt::Debug {}
269
269
= help: add #![feature(const_fn)] to the crate attributes to enable
270
270
271
271
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
272
- --> $DIR/min_const_fn.rs:135 :23
272
+ --> $DIR/min_const_fn.rs:136 :23
273
273
|
274
274
LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
275
275
| ^^
@@ -278,7 +278,7 @@ LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
278
278
= help: add #![feature(const_fn)] to the crate attributes to enable
279
279
280
280
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
281
- --> $DIR/min_const_fn.rs:136 :32
281
+ --> $DIR/min_const_fn.rs:137 :32
282
282
|
283
283
LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
284
284
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -287,7 +287,7 @@ LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
287
287
= help: add #![feature(const_fn)] to the crate attributes to enable
288
288
289
289
error[E0515]: cannot return reference to temporary value
290
- --> $DIR/min_const_fn.rs:136 :63
290
+ --> $DIR/min_const_fn.rs:137 :63
291
291
|
292
292
LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
293
293
| ^--
@@ -296,7 +296,7 @@ LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
296
296
| returns a reference to data owned by the current function
297
297
298
298
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
299
- --> $DIR/min_const_fn.rs:144 :41
299
+ --> $DIR/min_const_fn.rs:145 :41
300
300
|
301
301
LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
302
302
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -305,7 +305,7 @@ LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1
305
305
= help: add #![feature(const_fn)] to the crate attributes to enable
306
306
307
307
error[E0723]: function pointers in const fn are unstable
308
- --> $DIR/min_const_fn.rs:147 :21
308
+ --> $DIR/min_const_fn.rs:148 :21
309
309
|
310
310
LL | const fn no_fn_ptrs(_x: fn()) {}
311
311
| ^^
@@ -314,7 +314,7 @@ LL | const fn no_fn_ptrs(_x: fn()) {}
314
314
= help: add #![feature(const_fn)] to the crate attributes to enable
315
315
316
316
error[E0723]: function pointers in const fn are unstable
317
- --> $DIR/min_const_fn.rs:149 :27
317
+ --> $DIR/min_const_fn.rs:150 :27
318
318
|
319
319
LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
320
320
| ^^^^
0 commit comments