std: Clean out deprecated APIs#34705
Conversation
|
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
|
Oh also to be clear, this is removing unstable and deprecated APIs, not just deprecated APIs of course. |
|
These were deprecated recently. ISTM they are likely to be in wide use. Do we need to remove them yet? |
|
@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. |
|
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 @bors r+ |
|
📌 Commit a6ded4a has been approved by |
|
Thanks @brson ! |
|
⌛ Testing commit a6ded4a with merge c7c6f25... |
|
💔 Test failed - auto-win-msvc-64-opt-mir |
a6ded4a to
b44e0a1
Compare
|
@bors: r=brson |
|
📌 Commit b44e0a1 has been approved by |
|
⌛ Testing commit b44e0a1 with merge e1e4853... |
|
💔 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.
b44e0a1 to
a7220d9
Compare
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.
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.
This primarily removes a lot of
sync::Static*APIs and rejiggers theassociated implementations. While doing this it was discovered that the
is_poisonedmethod can actually result in a data race for the Mutex/RwLockprimitives, so the inner
Cell<bool>was changed to anAtomicBoolto preventthe associated data race. Otherwise the usage/gurantees should be the same
they were before.