2020-09-02 10:40:56 +03:00
error[E0277]: the type `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
2022-08-16 06:27:22 +00:00
--> $DIR/interior-mutability.rs:5:18
2017-06-01 15:46:26 +05:30
|
2018-06-09 16:53:36 -07:00
LL | catch_unwind(|| { x.set(23); });
2022-08-16 06:27:22 +00:00
| ------------ ^^^^^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
| |
| required by a bound introduced by this call
2021-06-10 13:52:00 +02:00
|
2020-09-02 10:40:56 +03:00
= help: within `Cell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>`
2023-05-03 19:27:29 +03:00
note: required because it appears within the type `Cell<i32>`
--> $SRC_DIR/core/src/cell.rs:LL:COL
2022-08-15 21:31:37 +01:00
= note: required for `&Cell<i32>` to implement `UnwindSafe`
2022-06-19 13:59:36 -05:00
note: required because it's used within this closure
--> $DIR/interior-mutability.rs:5:18
|
LL | catch_unwind(|| { x.set(23); });
2022-06-27 07:45:35 +02:00
| ^^
2021-07-31 09:26:55 -07:00
note: required by a bound in `catch_unwind`
--> $SRC_DIR/std/src/panic.rs:LL:COL
2017-06-01 15:46:26 +05:30
2017-07-02 16:09:09 +03:00
error: aborting due to previous error
2017-06-01 15:46:26 +05:30
2018-03-03 15:59:40 +01:00
For more information about this error, try `rustc --explain E0277`.