Skip to content

Treat drop glue as an implicit use at scope exit - #457

Draft
xonx4l wants to merge 2 commits into
rust-lang:mainfrom
xonx4l:drop-glue-scope-exit
Draft

xonx4l wants to merge 2 commits into
rust-lang:mainfrom
xonx4l:drop-glue-scope-exit

Conversation

@xonx4l

@xonx4l xonx4l commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds ty_needs_drop

e.g., closes #423

How does it work, what questions do you have?

Adds ty_needs_drop: whether dropping a type runs user code a direct Drop impl or a field that transitively has one with generics substituted. Conservative for types we cannot see through matching rustc's needs_drop.

AI disclosure

  • I did not use any AI tools

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop: detect implicit use at scope exit (drop glue)

2 participants