]> git.lizzy.rs Git - rust.git/blob - tests/ui/interior-mutability/interior-mutability.stderr
Make `output_filenames` a real query
[rust.git] / tests / ui / interior-mutability / interior-mutability.stderr
1 error[E0277]: the type `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
2   --> $DIR/interior-mutability.rs:5:18
3    |
4 LL |     catch_unwind(|| { x.set(23); });
5    |     ------------ ^^^^^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
6    |     |
7    |     required by a bound introduced by this call
8    |
9    = help: within `Cell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>`
10    = note: required because it appears within the type `Cell<i32>`
11    = note: required for `&Cell<i32>` to implement `UnwindSafe`
12 note: required because it's used within this closure
13   --> $DIR/interior-mutability.rs:5:18
14    |
15 LL |     catch_unwind(|| { x.set(23); });
16    |                  ^^
17 note: required by a bound in `catch_unwind`
18   --> $SRC_DIR/std/src/panic.rs:LL:COL
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0277`.