Mutex and RwLock need RefUnwindSafe too.
This commit is contained in:
parent
d40c593f42
commit
c11540587f
2 changed files with 8 additions and 0 deletions
|
|
@ -227,6 +227,12 @@ impl<T: ?Sized> !RefUnwindSafe for UnsafeCell<T> {}
|
|||
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
||||
impl<T> RefUnwindSafe for AssertUnwindSafe<T> {}
|
||||
|
||||
// XXX: Obviously wrong, but what should it be?
|
||||
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
||||
impl<T: ?Sized> RefUnwindSafe for Mutex<T> {}
|
||||
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
||||
impl<T: ?Sized> RefUnwindSafe for RwLock<T> {}
|
||||
|
||||
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
||||
impl<T> Deref for AssertUnwindSafe<T> {
|
||||
type Target = T;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ fn main() {
|
|||
assert::<Box<i32>>();
|
||||
assert::<Mutex<i32>>();
|
||||
assert::<RwLock<i32>>();
|
||||
assert::<&Mutex<i32>>();
|
||||
assert::<&RwLock<i32>>();
|
||||
assert::<Rc<i32>>();
|
||||
assert::<Arc<i32>>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue