fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.1 KiB47 linesraw
1error[E0277]: the type `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
2  --> $DIR/not-panic-safe-4.rs:9:14
3   |
4LL |     assert::<&RefCell<i32>>();
5   |              ^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
6   |
7   = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>`
8note: required because it appears within the type `RefCell<i32>`
9  --> $SRC_DIR/core/src/cell.rs:LL:COL
10   = note: required for `&RefCell<i32>` to implement `UnwindSafe`
11note: required by a bound in `assert`
12  --> $DIR/not-panic-safe-4.rs:6:14
13   |
14LL | fn assert<T: UnwindSafe + ?Sized>() {}
15   |              ^^^^^^^^^^ required by this bound in `assert`
16help: consider removing the leading `&`-reference
17   |
18LL -     assert::<&RefCell<i32>>();
19LL +     assert::<RefCell<i32>>();
20   |
21
22error[E0277]: the type `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
23  --> $DIR/not-panic-safe-4.rs:9:14
24   |
25LL |     assert::<&RefCell<i32>>();
26   |              ^^^^^^^^^^^^^ `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
27   |
28   = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<isize>`
29note: required because it appears within the type `Cell<isize>`
30  --> $SRC_DIR/core/src/cell.rs:LL:COL
31note: required because it appears within the type `RefCell<i32>`
32  --> $SRC_DIR/core/src/cell.rs:LL:COL
33   = note: required for `&RefCell<i32>` to implement `UnwindSafe`
34note: required by a bound in `assert`
35  --> $DIR/not-panic-safe-4.rs:6:14
36   |
37LL | fn assert<T: UnwindSafe + ?Sized>() {}
38   |              ^^^^^^^^^^ required by this bound in `assert`
39help: consider removing the leading `&`-reference
40   |
41LL -     assert::<&RefCell<i32>>();
42LL +     assert::<RefCell<i32>>();
43   |
44
45error: aborting due to 2 previous errors
46
47For more information about this error, try `rustc --explain E0277`.