Skip to content

Conversation

cheater
Copy link

@cheater cheater commented Sep 21, 2025

Explain dangling reference prevention better.

The original wording might lead someone learning Rust to think that data will be kept around for as long as a reference exists. Instead, as soon as data is dropped, the reference is barred from being used. Those are two different mechanisms, and this disambiguates which one is in place.

Original discussion can be found here, on the Rust discord: https://discord.com/channels/273534239310479360/1120124565591425034/1419141200127983727

Explain dangling reference prevention better.

The original wording might lead someone learning Rust to think that data will be kept around for as long as a reference exists. Instead, as soon as data is dropped, the reference is barred from being used. Those are two different mechanisms, and this disambiguates which one is in place.
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.

1 participant