Skip to content

Conversation

joshtriplett
Copy link
Member

Avoid implying a difference between the two. The existing wording could
be read as "either its destructor is run or it is dropped", implying a
difference.

Avoid implying a difference between the two. The existing wording could
be read as "either its destructor is run or it is dropped", implying a
difference.
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Oct 4, 2025
Comment on lines +6 to +7
[scope](#drop-scopes), it is *dropped*, which means its *destructor* is run.
(The two terms are used interchangeably here.)
Copy link
Contributor

@traviscross traviscross Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropped and destructor aren't the two terms used interchangeably. (We use the emphasis to define terms, so what's under emphasis matters here.) While extending the emphasis on the latter to include "is run" would be one option, that reads strangely to me still, so maybe there are other options here.

It'd seem better to me if we could find a factoring that avoided this parenthetical. This is just an introduction. Maybe something like reversing the terms back to the original order and saying something like "When a value or temporary goes out of scope and its destructor is run, we say that it has been dropped."

(I'm happy to make the revision here if something along these lines sounds OK to you.)

(This assumes that we want to treat these as equated, which as I mentioned in private communication, is probably not how this is meant currently.)

Copy link
Member Author

@joshtriplett joshtriplett Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this PR having flagged the underlying issue; feel free to edit and merge, as I'm not attached to the exact wording here and I'm not currently building anything further atop this.

@ehuss
Copy link
Contributor

ehuss commented Oct 4, 2025

We have issue #1078 for this. As what came up before, I still think that dropping and running a destructor are not the same thing.

The wording could certainly be clarified, but I think it would be good for us to first come to an agreement what terminology we want to use.

@traviscross
Copy link
Contributor

We have issue #1078 for this. As what came up before, I still think that dropping and running a destructor are not the same thing.

The wording could certainly be clarified, but I think it would be good for us to first come to an agreement what terminology we want to use.

I'm talking with Josh separately, and this was my read as well that the existing text meant to distinguish these rather than to equate them.

We should at a minimum remove the comma there, since that makes it seem like the clause is non-restrictive when it's meant restrictively -- i.e. it can't be dropped without changing the meaning of the sentence.

@traviscross
Copy link
Contributor

@rustbot
Copy link
Collaborator

rustbot commented Oct 6, 2025

☔ The latest upstream changes (possibly 8efb980) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants