Closed
Description
Code
I tried this code:
pub const fn f<T, const N: usize>(_: [std::mem::MaybeUninit<T>; N]) {}
I expected it to compile successfully. Instead, this happened:
error[E0493]: destructor of `[MaybeUninit<T>; N]` cannot be evaluated at compile-time
--> x.rs:1:35
|
1 | pub const fn f<T, const N: usize>(_: [std::mem::MaybeUninit<T>; N]) {}
| ^ - value is dropped here
| |
| the destructor for this type cannot be evaluated in constant functions
Version it worked on
It most recently worked on 1.72
Version with regression
Regressed in aafd75a cc @fee1-dead @oli-obk
Originally reported in #115403 (comment) cc @itsxaos
@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged