@@ -245,17 +245,33 @@ LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
245
245
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
246
246
= help: add `#![feature(const_fn)]` to the crate attributes to enable
247
247
248
+ error[E0493]: destructors cannot be evaluated at compile-time
249
+ --> $DIR/min_const_fn.rs:126:19
250
+ |
251
+ LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
252
+ | ^^ - value is dropped here
253
+ | |
254
+ | constant functions cannot evaluate destructors
255
+
248
256
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
249
- --> $DIR/min_const_fn.rs:128 :22
257
+ --> $DIR/min_const_fn.rs:129 :22
250
258
|
251
259
LL | const fn no_apit(_x: impl std::fmt::Debug) {}
252
260
| ^^^^^^^^^^^^^^^^^^^^
253
261
|
254
262
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
255
263
= help: add `#![feature(const_fn)]` to the crate attributes to enable
256
264
265
+ error[E0493]: destructors cannot be evaluated at compile-time
266
+ --> $DIR/min_const_fn.rs:129:18
267
+ |
268
+ LL | const fn no_apit(_x: impl std::fmt::Debug) {}
269
+ | ^^ - value is dropped here
270
+ | |
271
+ | constant functions cannot evaluate destructors
272
+
257
273
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
258
- --> $DIR/min_const_fn.rs:129 :23
274
+ --> $DIR/min_const_fn.rs:132 :23
259
275
|
260
276
LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
261
277
| ^^
@@ -264,25 +280,43 @@ LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
264
280
= help: add `#![feature(const_fn)]` to the crate attributes to enable
265
281
266
282
error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
267
- --> $DIR/min_const_fn.rs:130:63
283
+ --> $DIR/min_const_fn.rs:134:32
284
+ |
285
+ LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
286
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
287
+ |
288
+ = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
289
+ = help: add `#![feature(const_fn)]` to the crate attributes to enable
290
+
291
+ error[E0723]: unsizing casts to types besides slices are not allowed in const fn
292
+ --> $DIR/min_const_fn.rs:134:63
268
293
|
269
294
LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
270
295
| ^^^
271
296
|
272
297
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
273
298
= help: add `#![feature(const_fn)]` to the crate attributes to enable
274
299
275
- error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable
276
- --> $DIR/min_const_fn.rs:135:41
300
+ error[E0723]: unsizing casts to types besides slices are not allowed in const fn
301
+ --> $DIR/min_const_fn.rs:134:63
302
+ |
303
+ LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
304
+ | ^^^
305
+ |
306
+ = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
307
+ = help: add `#![feature(const_fn)]` to the crate attributes to enable
308
+
309
+ error[E0723]: unsizing casts to types besides slices are not allowed in const fn
310
+ --> $DIR/min_const_fn.rs:141:42
277
311
|
278
312
LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
279
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^
313
+ | ^^^
280
314
|
281
315
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
282
316
= help: add `#![feature(const_fn)]` to the crate attributes to enable
283
317
284
318
error[E0658]: function pointers cannot appear in constant functions
285
- --> $DIR/min_const_fn.rs:138 :21
319
+ --> $DIR/min_const_fn.rs:144 :21
286
320
|
287
321
LL | const fn no_fn_ptrs(_x: fn()) {}
288
322
| ^^
@@ -291,7 +325,7 @@ LL | const fn no_fn_ptrs(_x: fn()) {}
291
325
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
292
326
293
327
error[E0658]: function pointers cannot appear in constant functions
294
- --> $DIR/min_const_fn.rs:140 :27
328
+ --> $DIR/min_const_fn.rs:146 :27
295
329
|
296
330
LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
297
331
| ^^^^
@@ -300,15 +334,15 @@ LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
300
334
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
301
335
302
336
error[E0658]: function pointer casts are not allowed in constant functions
303
- --> $DIR/min_const_fn.rs:140 :46
337
+ --> $DIR/min_const_fn.rs:146 :46
304
338
|
305
339
LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
306
340
| ^^^
307
341
|
308
342
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
309
343
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
310
344
311
- error: aborting due to 35 previous errors
345
+ error: aborting due to 39 previous errors
312
346
313
347
Some errors have detailed explanations: E0013, E0493, E0658, E0723.
314
348
For more information about an error, try `rustc --explain E0013`.
0 commit comments