Skip to content
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

Add as_unsafe_cell() for Cell and RefCell #18212

Merged
merged 1 commit into from Oct 26, 2014

Conversation

kmcallister
Copy link
Contributor

Fixes #18131.

@rust-highfive
Copy link
Collaborator

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@alexcrichton
Copy link
Member

This does unfortunately allow access to the public field of UnsafeCell to allow illegal access in otherwise safe code, so these may want to be unsafe for now unless we can figure out a better solution for the public field in the UnsafeCell.

Also, can you move the tests to src/libcoretest?

@kmcallister
Copy link
Contributor Author

Addressed review feedback. I can squash this into a single commit once you're done reviewing.

@alexcrichton
Copy link
Member

Ok, looks good to me. Could you also mark the functions as #[experimental] instead of #[unstable]? That's generally our default for new code added.

@kmcallister
Copy link
Contributor Author

Could you also mark the functions as #[experimental] instead of #[unstable]?

Rebased and squashed with this change. Thanks for the review!

bors added a commit that referenced this pull request Oct 26, 2014
@bors bors closed this Oct 26, 2014
@bors bors merged commit 7317ef5 into rust-lang:master Oct 26, 2014
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.

Allow (unsafe) access to the UnsafeCell inside RefCell
6 participants