@@ -245,17 +245,33 @@ LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
245245 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
246246 = help: add `#![feature(const_fn)]` to the crate attributes to enable
247247
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+
248256error[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
250258 |
251259LL | const fn no_apit(_x: impl std::fmt::Debug) {}
252260 | ^^^^^^^^^^^^^^^^^^^^
253261 |
254262 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
255263 = help: add `#![feature(const_fn)]` to the crate attributes to enable
256264
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+
257273error[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
259275 |
260276LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
261277 | ^^
@@ -264,25 +280,43 @@ LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {}
264280 = help: add `#![feature(const_fn)]` to the crate attributes to enable
265281
266282error[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
268293 |
269294LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
270295 | ^^^
271296 |
272297 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
273298 = help: add `#![feature(const_fn)]` to the crate attributes to enable
274299
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
277311 |
278312LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 }
279- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^
313+ | ^^^
280314 |
281315 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
282316 = help: add `#![feature(const_fn)]` to the crate attributes to enable
283317
284318error[E0658]: function pointers cannot appear in constant functions
285- --> $DIR/min_const_fn.rs:138 :21
319+ --> $DIR/min_const_fn.rs:144 :21
286320 |
287321LL | const fn no_fn_ptrs(_x: fn()) {}
288322 | ^^
@@ -291,7 +325,7 @@ LL | const fn no_fn_ptrs(_x: fn()) {}
291325 = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
292326
293327error[E0658]: function pointers cannot appear in constant functions
294- --> $DIR/min_const_fn.rs:140 :27
328+ --> $DIR/min_const_fn.rs:146 :27
295329 |
296330LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
297331 | ^^^^
@@ -300,15 +334,15 @@ LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
300334 = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
301335
302336error[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
304338 |
305339LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
306340 | ^^^
307341 |
308342 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
309343 = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
310344
311- error: aborting due to 35 previous errors
345+ error: aborting due to 39 previous errors
312346
313347Some errors have detailed explanations: E0013, E0493, E0658, E0723.
314348For more information about an error, try `rustc --explain E0013`.
0 commit comments