Skip to content

Conversation

matklad
Copy link
Contributor

@matklad matklad commented Aug 17, 2020

See the failed build in

#75555 (comment)

for an example where we need this in real life

r? @ghost

@matklad
Copy link
Contributor Author

matklad commented Aug 17, 2020

r? @KodrAus

@matklad
Copy link
Contributor Author

matklad commented Aug 17, 2020

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 matklad added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 18, 2020
@KodrAus
Copy link
Contributor

KodrAus commented Aug 19, 2020

Ah nice spotting!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 19, 2020

📌 Commit 695d86f has been approved by KodrAus

@bors 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
@matklad
Copy link
Contributor Author

matklad commented 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
@bors bors merged commit 4123237 into rust-lang:master Aug 19, 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].
Copy link
Member

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

@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants