rust-lang / rust · Issue No. 163149
I tried this code:
pub struct Thing<T>(*const T) where [T]: Sized;
impl<T> Drop for Thing<T> where [T]: Sized {
fn drop(&mut self) {}
}
// Requires dropping Thing<T> in const
pub const fn foo<T>(_x: Thing<T>) where [T]: Sized {}
This code errors in beta, with the following error:
error[E0493]: destructor of `Thing<T>` cannot be evaluated at compile-time
--> src/lib.rs:8:21
|
8 | pub const fn foo<T>(_x: Thing<T>) where [T]: Sized {}
| ^^ - value is dropped here
| |
| the destructor for this type cannot be evaluated in constant functions
For more information about this error, try `rustc --explain E0493`.
However, it compiles in nightly without any errors. It's unclear to me whether this is desirable.
It failed to compile on: 1.99.0-beta.7 (2026-09-19 aa0593682acc35672839) on the playground.
It compiles without errors on: 1.100.0-nightly (2026-09-21 1303417c416e1595173d) on the playground.
Relay reads this issue against the repository's contribution signals: the files it is likely to touch, how the maintainers triage work this size, and what the first contribution would exercise.
The full analysis for this issue is still being assembled. Until then, the description above and the thread on GitHub are the most reliable context.