mlua/tests/compile/ref_nounwindsafe.stderr

40 lines
2.7 KiB
Plaintext
Raw Normal View History

2020-12-29 18:20:06 -05:00
error[E0277]: the type `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());
2020-12-29 18:20:06 -05:00
| ^^^^^^^^^^^^ `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
|
::: $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> {
2020-12-29 18:20:06 -05:00
| ---------- required by this bound in `catch_unwind`
2020-09-28 18:24:53 -04:00
|
2020-12-29 18:20:06 -05:00
= help: within `Lua`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<()>`
= note: required because it appears within the type `PhantomData<UnsafeCell<()>>`
= note: required because it appears within the type `Lua`
= note: required because of the requirements on the impl of `UnwindSafe` for `&Lua`
2019-11-29 08:26:30 -05:00
= note: required because it appears within the type `mlua::types::LuaRef<'_>`
2020-12-29 18:20:06 -05:00
= note: required because it appears within the type `LuaTable<'_>`
= note: required because it appears within the type `[closure@$DIR/tests/compile/ref_nounwindsafe.rs:8:18: 8:54]`
2021-07-13 06:59:33 -04:00
2021-09-15 19:49:17 -04:00
error[E0277]: the type `UnsafeCell<mlua::lua::ExtraData>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
2021-07-13 06:59:33 -04:00
--> $DIR/ref_nounwindsafe.rs:8:5
|
8 | catch_unwind(move || table.set("a", "b").unwrap());
2021-09-15 19:49:17 -04:00
| ^^^^^^^^^^^^ `UnsafeCell<mlua::lua::ExtraData>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
2021-07-13 06:59:33 -04:00
|
::: $RUST/std/src/panic.rs
|
| pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
| ---------- required by this bound in `catch_unwind`
|
2021-09-15 19:49:17 -04:00
= help: within `Lua`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<mlua::lua::ExtraData>`
= note: required because it appears within the type `alloc::sync::ArcInner<UnsafeCell<mlua::lua::ExtraData>>`
= note: required because it appears within the type `PhantomData<alloc::sync::ArcInner<UnsafeCell<mlua::lua::ExtraData>>>`
= note: required because it appears within the type `Arc<UnsafeCell<mlua::lua::ExtraData>>`
2021-07-13 06:59:33 -04:00
= note: required because it appears within the type `Lua`
= note: required because of the requirements on the impl of `UnwindSafe` for `&Lua`
= note: required because it appears within the type `mlua::types::LuaRef<'_>`
= note: required because it appears within the type `LuaTable<'_>`
= note: required because it appears within the type `[closure@$DIR/tests/compile/ref_nounwindsafe.rs:8:18: 8:54]`