mlua/tests/compile/lua_norefunwindsafe.stderr

23 lines
1.5 KiB
Plaintext
Raw Normal View History

2022-04-13 09:30:52 -04:00
error[E0277]: the type `UnsafeCell<mlua::lua::LuaInner>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
2021-11-27 08:42:22 -05:00
--> tests/compile/lua_norefunwindsafe.rs:7:5
2019-11-29 08:26:30 -05:00
|
7 | catch_unwind(|| lua.create_table().unwrap());
2022-04-13 09:30:52 -04:00
| ^^^^^^^^^^^^ `UnsafeCell<mlua::lua::LuaInner>` 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
|
2022-04-13 09:30:52 -04:00
= help: within `Lua`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<mlua::lua::LuaInner>`
= note: required because it appears within the type `alloc::sync::ArcInner<UnsafeCell<mlua::lua::LuaInner>>`
= note: required because it appears within the type `PhantomData<alloc::sync::ArcInner<UnsafeCell<mlua::lua::LuaInner>>>`
= note: required because it appears within the type `Arc<UnsafeCell<mlua::lua::LuaInner>>`
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`
2022-08-23 18:12:37 -04:00
note: required because it's used within this closure
--> tests/compile/lua_norefunwindsafe.rs:7:18
|
7 | catch_unwind(|| lua.create_table().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2021-11-27 08:42:22 -05:00
note: required by a bound in `catch_unwind`
--> $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`