rustc refuses to compile const function due to potential drops even when nothing is being dropped #115403
Labels
A-const-eval
Area: Constant evaluation (MIR interpretation)
A-destructors
Area: Destructors (`Drop`, …)
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: It compiles
Instead, this happened:
Meta
This errors on stable 1.72 as well as on nightly-2023-08-30.
This is maybe the same as #109427, but since that is about patterns, and this is not, I thought the independent report is justified.
The text was updated successfully, but these errors were encountered: