]> git.lizzy.rs Git - rust.git/blob - src/test/ui/not-panic/not-panic-safe-3.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / not-panic / not-panic-safe-3.stderr
1 error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
2   --> $DIR/not-panic-safe-3.rs:10:5
3    |
4 LL |     assert::<Arc<RefCell<i32>>>();
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
6    |
7    = help: within `std::cell::RefCell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>`
8    = note: required because it appears within the type `std::cell::RefCell<i32>`
9    = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::sync::Arc<std::cell::RefCell<i32>>`
10 note: required by `assert`
11   --> $DIR/not-panic-safe-3.rs:7:1
12    |
13 LL | fn assert<T: UnwindSafe + ?Sized>() {}
14    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15
16 error[E0277]: the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
17   --> $DIR/not-panic-safe-3.rs:10:5
18    |
19 LL |     assert::<Arc<RefCell<i32>>>();
20    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
21    |
22    = help: within `std::cell::RefCell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<isize>`
23    = note: required because it appears within the type `std::cell::Cell<isize>`
24    = note: required because it appears within the type `std::cell::RefCell<i32>`
25    = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::sync::Arc<std::cell::RefCell<i32>>`
26 note: required by `assert`
27   --> $DIR/not-panic-safe-3.rs:7:1
28    |
29 LL | fn assert<T: UnwindSafe + ?Sized>() {}
30    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
32 error: aborting due to 2 previous errors
33
34 For more information about this error, try `rustc --explain E0277`.