Mutex and RwLock need RefUnwindSafe too#34756
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
r? @sfackler |
| impl<T> RefUnwindSafe for AssertUnwindSafe<T> {} | ||
|
|
||
| // XXX: Obviously wrong, but what should it be? | ||
| #[stable(feature = "catch_unwind", since = "1.9.0")] |
There was a problem hiding this comment.
You can just make up a new feature name and change the since version to 1.12.0.
This is the first (and presumably only) use of this feature.
|
LGTM but ping @aturon |
|
⌛ Testing commit fbec232 with merge 617039b... |
Mutex and RwLock need RefUnwindSafe too Incomplete, because I don't know what the appropriate stability annotation is here, but this is an attempt to bring the documentation for `std::panic` in line with reality. Right now, it says: >Types like `&Mutex<T>`, however, are unwind safe because they implement poisoning by default. But only `Mutex<T>`, not `&Mutex<T>`, is unwind-safe.
Incomplete, because I don't know what the appropriate stability annotation is here, but this is an attempt to bring the documentation for
std::panicin line with reality. Right now, it says:But only
Mutex<T>, not&Mutex<T>, is unwind-safe.