reference icon indicating copy to clipboard operation
reference copied to clipboard

Destructors: Reword introduction of terms "destructor" and "dropped"

Open joshtriplett opened this issue 3 months ago • 4 comments

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.

joshtriplett avatar Oct 04 '25 21:10 joshtriplett

We have issue https://github.com/rust-lang/reference/issues/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.

ehuss avatar Oct 04 '25 23:10 ehuss

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 avatar Oct 05 '25 00:10 traviscross

See:

  • https://github.com/rust-lang/reference/pull/2035

traviscross avatar Oct 05 '25 00:10 traviscross

:umbrella: The latest upstream changes (possibly 8efb9805686722dba511b7b27281bb6b77d32130) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar Oct 06 '25 15:10 rustbot