Skip to content

Conversation

jamm-es
Copy link

@jamm-es jamm-es commented Aug 29, 2025

The current explanation for trait > drop asserts that drop for struct fields are called before the drop implementation of the struct itself. But this is incorrect, the order is actually reversed. (e.g., this sample).

This PR fixes the previous explanation to have the correct order of operations.

@rustbot
Copy link
Collaborator

rustbot commented Aug 29, 2025

r? @marioidival

rustbot has assigned @marioidival.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@marioidival marioidival merged commit dd26bc8 into rust-lang:master Sep 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants