]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0277]: the type `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary |
ba9703b0 | 2 | --> $DIR/interior-mutability.rs:5:5 |
041b39d2 | 3 | | |
8faf50e0 | 4 | LL | catch_unwind(|| { x.set(23); }); |
1b1a35ee | 5 | | ^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary |
041b39d2 | 6 | | |
1b1a35ee XL |
7 | = help: within `Cell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>` |
8 | = note: required because it appears within the type `Cell<i32>` | |
9 | = note: required because of the requirements on the impl of `UnwindSafe` for `&Cell<i32>` | |
10 | = note: required because it appears within the type `[closure@$DIR/interior-mutability.rs:5:18: 5:35]` | |
94222f64 XL |
11 | note: required by a bound in `catch_unwind` |
12 | --> $SRC_DIR/std/src/panic.rs:LL:COL | |
13 | | | |
14 | LL | pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> { | |
15 | | ^^^^^^^^^^ required by this bound in `catch_unwind` | |
041b39d2 XL |
16 | |
17 | error: aborting due to previous error | |
18 | ||
0531ce1d | 19 | For more information about this error, try `rustc --explain E0277`. |