mlua/tests/compile/ref_nounwindsafe.stderr

19 lines
1.3 KiB
Plaintext
Raw Normal View History

2019-10-16 09:59:40 -04:00
error[E0277]: the type `std::cell::UnsafeCell<()>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
2019-11-29 08:26:30 -05:00
--> $DIR/ref_nounwindsafe.rs:8:5
|
8 | catch_unwind(move || table.set("a", "b").unwrap());
| ^^^^^^^^^^^^ `std::cell::UnsafeCell<()>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
|
::: $RUST/std/src/panic.rs
2020-09-28 18:24:53 -04:00
|
| pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
| ---------- required by this bound in `std::panic::catch_unwind`
|
= help: within `mlua::Lua`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<()>`
2019-11-29 08:26:30 -05:00
= note: required because it appears within the type `std::marker::PhantomData<std::cell::UnsafeCell<()>>`
2020-09-28 18:24:53 -04:00
= note: required because it appears within the type `mlua::Lua`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&mlua::Lua`
2019-11-29 08:26:30 -05:00
= note: required because it appears within the type `mlua::types::LuaRef<'_>`
2020-09-28 18:24:53 -04:00
= note: required because it appears within the type `mlua::Table<'_>`
= note: required because it appears within the type `[closure@$DIR/tests/compile/ref_nounwindsafe.rs:8:18: 8:54 table:mlua::Table<'_>]`