Skip to content

Reject implementing const Drop for types that are not const Destruct already#155676

Open
oli-obk wants to merge 2 commits intorust-lang:mainfrom
oli-obk:const-drop-non-const-destruct
Open

Reject implementing const Drop for types that are not const Destruct already#155676
oli-obk wants to merge 2 commits intorust-lang:mainfrom
oli-obk:const-drop-non-const-destruct

Conversation

@oli-obk
Copy link
Copy Markdown
Contributor

@oli-obk oli-obk commented Apr 23, 2026

fixes #155618

While there is no soundness or otherwise issue currently, this PR ensures that people get what they expect. It seems wrong to allow implementing const Drop, but then the type still can't be dropped at compile-time.

r? @fee1-dead

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 23, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 23, 2026

fee1-dead is not on the review rotation at the moment.
They may take a while to respond.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

const Drop can be implemented for structs with non-const-Drop fields

3 participants