error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> tests/compile/lua_norefunwindsafe.rs:7:18 | 7 | catch_unwind(|| lua.create_table().unwrap()); | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | | | required by a bound introduced by this call | = help: within `Lua`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell`, which is required by `{closure@$DIR/tests/compile/lua_norefunwindsafe.rs:7:18: 7:20}: UnwindSafe` note: required because it appears within the type `lock_api::remutex::ReentrantMutex` --> $CARGO/lock_api-0.4.12/src/remutex.rs | | pub struct ReentrantMutex { | ^^^^^^^^^^^^^^ note: required because it appears within the type `alloc::sync::ArcInner>` --> $RUST/alloc/src/sync.rs | | struct ArcInner { | ^^^^^^^^ note: required because it appears within the type `PhantomData>>` --> $RUST/core/src/marker.rs | | pub struct PhantomData; | ^^^^^^^^^^^ note: required because it appears within the type `Arc>` --> $RUST/alloc/src/sync.rs | | pub struct Arc< | ^^^ note: required because it appears within the type `Lua` --> src/state.rs | | pub struct Lua { | ^^^ = note: required for `&Lua` to implement `UnwindSafe` note: required because it's used within this closure --> tests/compile/lua_norefunwindsafe.rs:7:18 | 7 | catch_unwind(|| lua.create_table().unwrap()); | ^^ note: required by a bound in `std::panic::catch_unwind` --> $RUST/std/src/panic.rs | | pub fn catch_unwind R + UnwindSafe, R>(f: F) -> Result { | ^^^^^^^^^^ required by this bound in `catch_unwind` error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> tests/compile/lua_norefunwindsafe.rs:7:18 | 7 | catch_unwind(|| lua.create_table().unwrap()); | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | | | required by a bound introduced by this call | = help: within `Lua`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell`, which is required by `{closure@$DIR/tests/compile/lua_norefunwindsafe.rs:7:18: 7:20}: UnwindSafe` note: required because it appears within the type `Cell` --> $RUST/core/src/cell.rs | | pub struct Cell { | ^^^^ note: required because it appears within the type `lock_api::remutex::RawReentrantMutex` --> $CARGO/lock_api-0.4.12/src/remutex.rs | | pub struct RawReentrantMutex { | ^^^^^^^^^^^^^^^^^ note: required because it appears within the type `lock_api::remutex::ReentrantMutex` --> $CARGO/lock_api-0.4.12/src/remutex.rs | | pub struct ReentrantMutex { | ^^^^^^^^^^^^^^ note: required because it appears within the type `alloc::sync::ArcInner>` --> $RUST/alloc/src/sync.rs | | struct ArcInner { | ^^^^^^^^ note: required because it appears within the type `PhantomData>>` --> $RUST/core/src/marker.rs | | pub struct PhantomData; | ^^^^^^^^^^^ note: required because it appears within the type `Arc>` --> $RUST/alloc/src/sync.rs | | pub struct Arc< | ^^^ note: required because it appears within the type `Lua` --> src/state.rs | | pub struct Lua { | ^^^ = note: required for `&Lua` to implement `UnwindSafe` note: required because it's used within this closure --> tests/compile/lua_norefunwindsafe.rs:7:18 | 7 | catch_unwind(|| lua.create_table().unwrap()); | ^^ note: required by a bound in `std::panic::catch_unwind` --> $RUST/std/src/panic.rs | | pub fn catch_unwind R + UnwindSafe, R>(f: F) -> Result { | ^^^^^^^^^^ required by this bound in `catch_unwind`