diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-09-04 10:17:59 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-09-22 11:33:12 -0700 |
| commit | b370c111fdb2bc6c6a67bc0ebb7bc4946344a15a (patch) | |
| tree | b950ce1553bef3e47eb3db6fc7085e629fe1fd16 /src/test/ui/interior-mutability | |
| parent | 4ff32c07da9d97e6dc315a4a5c9ffbb797cb27bb (diff) | |
| download | rust-b370c111fdb2bc6c6a67bc0ebb7bc4946344a15a.tar.gz rust-b370c111fdb2bc6c6a67bc0ebb7bc4946344a15a.zip | |
On obligation errors point at the unfulfilled binding when possible
Diffstat (limited to 'src/test/ui/interior-mutability')
| -rw-r--r-- | src/test/ui/interior-mutability/interior-mutability.stderr | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/ui/interior-mutability/interior-mutability.stderr b/src/test/ui/interior-mutability/interior-mutability.stderr index 31390bc6cce..1a726be4aa6 100644 --- a/src/test/ui/interior-mutability/interior-mutability.stderr +++ b/src/test/ui/interior-mutability/interior-mutability.stderr @@ -3,12 +3,16 @@ error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutabil | LL | catch_unwind(|| { x.set(23); }); | ^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary + | + ::: $SRC_DIR/libstd/panic.rs:LL:COL + | +LL | pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> { + | ---------- required by this bound in `std::panic::catch_unwind` | = help: within `std::cell::Cell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>` = note: required because it appears within the type `std::cell::Cell<i32>` = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&std::cell::Cell<i32>` = note: required because it appears within the type `[closure@$DIR/interior-mutability.rs:5:18: 5:35 x:&std::cell::Cell<i32>]` - = note: required by `std::panic::catch_unwind` error: aborting due to previous error |
