error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary --> tests/compile/ref_nounwindsafe.rs:8:18 | 8 | catch_unwind(move || table.set("a", "b").unwrap()); | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary | | | required by a bound introduced by this call | = help: within `alloc::sync::ArcInner>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell` note: required because it appears within the type `lock_api::remutex::ReentrantMutex` --> $CARGO/lock_api-$VERSION/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 for `NonNull>>` to implement `UnwindSafe` note: required because it appears within the type `std::sync::Weak>` --> $RUST/alloc/src/sync.rs | | pub struct Weak< | ^^^^ note: required because it appears within the type `WeakLua` --> src/state.rs | | pub struct WeakLua(XWeak>); | ^^^^^^^ note: required because it appears within the type `mlua::types::value_ref::ValueRef` --> src/types/value_ref.rs | | pub struct ValueRef { | ^^^^^^^^ note: required because it appears within the type `LuaTable` --> src/table.rs | | pub struct Table(pub(crate) ValueRef); | ^^^^^ note: required because it's used within this closure --> tests/compile/ref_nounwindsafe.rs:8:18 | 8 | catch_unwind(move || table.set("a", "b").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 transferable across a catch_unwind boundary --> tests/compile/ref_nounwindsafe.rs:8:18 | 8 | catch_unwind(move || table.set("a", "b").unwrap()); | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary | | | required by a bound introduced by this call | = help: within `alloc::sync::ArcInner>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell` 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-$VERSION/src/remutex.rs | | pub struct RawReentrantMutex { | ^^^^^^^^^^^^^^^^^ note: required because it appears within the type `lock_api::remutex::ReentrantMutex` --> $CARGO/lock_api-$VERSION/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 for `NonNull>>` to implement `UnwindSafe` note: required because it appears within the type `std::sync::Weak>` --> $RUST/alloc/src/sync.rs | | pub struct Weak< | ^^^^ note: required because it appears within the type `WeakLua` --> src/state.rs | | pub struct WeakLua(XWeak>); | ^^^^^^^ note: required because it appears within the type `mlua::types::value_ref::ValueRef` --> src/types/value_ref.rs | | pub struct ValueRef { | ^^^^^^^^ note: required because it appears within the type `LuaTable` --> src/table.rs | | pub struct Table(pub(crate) ValueRef); | ^^^^^ note: required because it's used within this closure --> tests/compile/ref_nounwindsafe.rs:8:18 | 8 | catch_unwind(move || table.set("a", "b").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`