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

Switch lazy_static over to mutable statics instead of UnsafeCell on nightly #55

Merged
merged 4 commits into from
Nov 20, 2017

Conversation

Kimundi
Copy link
Contributor

@Kimundi Kimundi commented Nov 16, 2016

rust-lang/rfcs#1440 got merged, so we can now get rid of the UnsafeCell in favor of directly having a drop type in a mutable static.

However, since the current UnsafeCell impl got also legitimized by the RFC, the current plan is to not merge this PR until either the drop_types_in_const feature gets stabilized, or is at least old enough to not require the most current version of the compiler.

@Kimundi Kimundi changed the title WIP: Switch lazy_static over to mutable statics instead of UnsafeCell on nightly Switch lazy_static over to mutable statics instead of UnsafeCell on nightly Nov 13, 2017
@Kimundi
Copy link
Contributor Author

Kimundi commented Nov 13, 2017

Alright, I'm giving this another spin. If anyone has any comments to this PR feel free to post them. :)

This also addresses @joshlf's concern in #84 about the spin dependency, and cleans up a few of the obsolete feature gate cfgs

Copy link
Contributor

@KodrAus KodrAus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@Kimundi
Copy link
Contributor Author

Kimundi commented Nov 20, 2017

Alright, thanks!

@Kimundi Kimundi merged commit cd632cb into master Nov 20, 2017
@Kimundi Kimundi deleted the destructor_drop branch November 20, 2017 10:01
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.

2 participants