Skip to content

Commit ebbbf20

Browse files
committed
add comment tests/ui/traits/catch-unwind-cell-interior-mut
1 parent 4e6bc15 commit ebbbf20

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/ui/traits/catch-unwind-cell-interior-mut.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! related issue: <https://github.com/rust-lang/rust/issues/40313>
12
//@ compile-flags: -Zwrite-long-types-to-disk=yes
23
use std::cell::Cell;
34
use std::panic::catch_unwind;

tests/ui/traits/catch-unwind-cell-interior-mut.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the type `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
2-
--> $DIR/interior-mutability.rs:6:18
2+
--> $DIR/catch-unwind-cell-interior-mut.rs:7:18
33
|
44
LL | catch_unwind(|| { x.set(23); });
55
| ------------ ^^^^^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
@@ -11,7 +11,7 @@ note: required because it appears within the type `Cell<i32>`
1111
--> $SRC_DIR/core/src/cell.rs:LL:COL
1212
= note: required for `&Cell<i32>` to implement `UnwindSafe`
1313
note: required because it's used within this closure
14-
--> $DIR/interior-mutability.rs:6:18
14+
--> $DIR/catch-unwind-cell-interior-mut.rs:7:18
1515
|
1616
LL | catch_unwind(|| { x.set(23); });
1717
| ^^

0 commit comments

Comments
 (0)