-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make OnceCell<T> transparent to dropck #75648
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @KodrAus |
For posterity, once_cell's PR: matklad/once_cell@d529514 |
See the failed build in rust-lang#75555 (comment) for an example where we need this in real life
matklad
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Aug 18, 2020
Ah nice spotting! @bors r+ rollup |
📌 Commit 695d86f has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Aug 19, 2020
cc #75700 |
tmandry
added a commit
to tmandry/rust
that referenced
this pull request
Aug 19, 2020
Make OnceCell<T> transparent to dropck See the failed build in rust-lang#75555 (comment) for an example where we need this in real life r? @ghost
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 19, 2020
Rollup of 7 pull requests Successful merges: - rust-lang#75069 (move const param structural match checks to wfcheck) - rust-lang#75587 (mir building: fix some comments) - rust-lang#75593 (Adjust installation place for compiler docs) - rust-lang#75648 (Make OnceCell<T> transparent to dropck) - rust-lang#75649 (Fix intra-doc links for inherent impls that are both lang items and not the default impl) - rust-lang#75674 (Move to intra doc links for std::io) - rust-lang#75696 (Remove `#[cfg(miri)]` from OnceCell tests) Failed merges: r? @ghost
m-ou-se
reviewed
Sep 5, 2020
fn drop(&mut self) { | ||
// Safety: The cell is being dropped, so it can't be accessed again | ||
// Safety: The cell is being dropped, so it can't be accessed again. | ||
// We also don't touch the `T`, which validates our usage of #[may_dangle]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this isn't safe after all :( See #76367
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See the failed build in
#75555 (comment)
for an example where we need this in real life
r? @ghost