Skip to content

std: Clean out deprecated APIs #34705

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

Merged
merged 1 commit into from
Jul 13, 2016
Merged

Conversation

alexcrichton
Copy link
Member

This primarily removes a lot of sync::Static* APIs and rejiggers the
associated implementations. While doing this it was discovered that the
is_poisoned method can actually result in a data race for the Mutex/RwLock
primitives, so the inner Cell<bool> was changed to an AtomicBool to prevent
the associated data race. Otherwise the usage/gurantees should be the same
they were before.

@rust-highfive
Copy link
Contributor

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

Oh also to be clear, this is removing unstable and deprecated APIs, not just deprecated APIs of course.

@brson
Copy link
Contributor

brson commented Jul 7, 2016

These were deprecated recently. ISTM they are likely to be in wide use. Do we need to remove them yet?

@alexcrichton
Copy link
Member Author

@bors note that these were all deprecated in 1.10, so they've been deprecated for at least 6 weeks, and our usual policy is a minimum of 6 weeks of deprecation (one cycle) and afterwards they're candidate for removal.

@brson
Copy link
Contributor

brson commented Jul 11, 2016

Here are the crates using StaticMutex or StaticCondvar: https://gist.github.com/brson/56df66685876da921616c499155bbeee

It's less than I expected. rwlock2 is going to be horribly broken, but it's not that widely used. gstreamer and nice are false positives. I'll file a bug against pkg-config.

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 11, 2016

📌 Commit a6ded4a has been approved by brson

@brson
Copy link
Contributor

brson commented Jul 11, 2016

Fix for pkg-config

@alexcrichton
Copy link
Member Author

Thanks @brson !

@bors
Copy link
Collaborator

bors commented Jul 12, 2016

⌛ Testing commit a6ded4a with merge c7c6f25...

@bors
Copy link
Collaborator

bors commented Jul 12, 2016

💔 Test failed - auto-win-msvc-64-opt-mir

@alexcrichton
Copy link
Member Author

@bors: r=brson

@bors
Copy link
Collaborator

bors commented Jul 12, 2016

📌 Commit b44e0a1 has been approved by brson

@bors
Copy link
Collaborator

bors commented Jul 12, 2016

⌛ Testing commit b44e0a1 with merge e1e4853...

@bors
Copy link
Collaborator

bors commented Jul 12, 2016

💔 Test failed - auto-linux-64-nopt-t

This primarily removes a lot of `sync::Static*` APIs and rejiggers the
associated implementations. While doing this it was discovered that the
`is_poisoned` method can actually result in a data race for the Mutex/RwLock
primitives, so the inner `Cell<bool>` was changed to an `AtomicBool` to prevent
the associated data race. Otherwise the usage/gurantees should be the same
they were before.
@alexcrichton
Copy link
Member Author

@bors: r=brson a7220d9

@bors
Copy link
Collaborator

bors commented Jul 12, 2016

⌛ Testing commit a7220d9 with merge 26fd011...

bors added a commit that referenced this pull request Jul 12, 2016
std: Clean out deprecated APIs

This primarily removes a lot of `sync::Static*` APIs and rejiggers the
associated implementations. While doing this it was discovered that the
`is_poisoned` method can actually result in a data race for the Mutex/RwLock
primitives, so the inner `Cell<bool>` was changed to an `AtomicBool` to prevent
the associated data race. Otherwise the usage/gurantees should be the same
they were before.
@bors bors merged commit a7220d9 into rust-lang:master Jul 13, 2016
@alexcrichton alexcrichton deleted the clean-deprecated branch August 26, 2016 18:30
kennytm added a commit to kennytm/rust that referenced this pull request Aug 7, 2018
Remove references to `StaticMutex` which got removed a while ago

`StaticMutex` got removed two years ago with rust-lang#34705, but still got referenced in some comments and even an error explanation.
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.

4 participants