mlua 0.11.3

High level bindings to Lua 5.4/5.3/5.2/5.1 (including LuaJIT) and Luau with async/await features and support of writing native Lua modules in Rust.
Documentation
error[E0277]: the type `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
 --> tests/compile/ref_nounwindsafe.rs:8:18
  |
8 |     catch_unwind(move || table.set("a", "b").unwrap());
  |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<usize>` 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 `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<usize>`
note: required because it appears within the type `Cell<usize>`
 --> $RUST/core/src/cell.rs
  |
  | pub struct Cell<T: ?Sized> {
  |            ^^^^
note: required because it appears within the type `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>`
 --> $RUST/alloc/src/rc.rs
  |
  | struct RcInner<T: ?Sized> {
  |        ^^^^^^^
  = note: required for `NonNull<rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>>` to implement `UnwindSafe`
note: required because it appears within the type `std::rc::Weak<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>`
 --> $RUST/alloc/src/rc.rs
  |
  | pub struct Weak<
  |            ^^^^
note: required because it appears within the type `WeakLua`
 --> src/state.rs
  |
  | pub struct WeakLua(XWeak<ReentrantMutex<RawLua>>);
  |            ^^^^^^^
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<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
  |                                        ^^^^^^^^^^ required by this bound in `catch_unwind`

error[E0277]: the type `UnsafeCell<*mut lua_State>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
 --> tests/compile/ref_nounwindsafe.rs:8:18
  |
8 |     catch_unwind(move || table.set("a", "b").unwrap());
  |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<*mut lua_State>` 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 `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<*mut lua_State>`
note: required because it appears within the type `Cell<*mut lua_State>`
 --> $RUST/core/src/cell.rs
  |
  | pub struct Cell<T: ?Sized> {
  |            ^^^^
note: required because it appears within the type `mlua::state::raw::RawLua`
 --> src/state/raw.rs
  |
  | pub struct RawLua {
  |            ^^^^^^
note: required because it appears within the type `mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>`
 --> src/types/sync.rs
  |
  |     pub(crate) struct ReentrantMutex<T>(T);
  |                       ^^^^^^^^^^^^^^
note: required because it appears within the type `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>`
 --> $RUST/alloc/src/rc.rs
  |
  | struct RcInner<T: ?Sized> {
  |        ^^^^^^^
  = note: required for `NonNull<rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>>` to implement `UnwindSafe`
note: required because it appears within the type `std::rc::Weak<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>`
 --> $RUST/alloc/src/rc.rs
  |
  | pub struct Weak<
  |            ^^^^
note: required because it appears within the type `WeakLua`
 --> src/state.rs
  |
  | pub struct WeakLua(XWeak<ReentrantMutex<RawLua>>);
  |            ^^^^^^^
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<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
  |                                        ^^^^^^^^^^ required by this bound in `catch_unwind`

error[E0277]: the type `UnsafeCell<mlua::state::extra::ExtraData>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
 --> tests/compile/ref_nounwindsafe.rs:8:18
  |
8 |     catch_unwind(move || table.set("a", "b").unwrap());
  |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<mlua::state::extra::ExtraData>` 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: the trait `RefUnwindSafe` is not implemented for `UnsafeCell<mlua::state::extra::ExtraData>`
  = note: required for `Rc<UnsafeCell<mlua::state::extra::ExtraData>>` to implement `RefUnwindSafe`
note: required because it appears within the type `mlua::state::raw::RawLua`
 --> src/state/raw.rs
  |
  | pub struct RawLua {
  |            ^^^^^^
note: required because it appears within the type `mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>`
 --> src/types/sync.rs
  |
  |     pub(crate) struct ReentrantMutex<T>(T);
  |                       ^^^^^^^^^^^^^^
note: required because it appears within the type `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>`
 --> $RUST/alloc/src/rc.rs
  |
  | struct RcInner<T: ?Sized> {
  |        ^^^^^^^
  = note: required for `NonNull<rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>>` to implement `UnwindSafe`
note: required because it appears within the type `std::rc::Weak<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>`
 --> $RUST/alloc/src/rc.rs
  |
  | pub struct Weak<
  |            ^^^^
note: required because it appears within the type `WeakLua`
 --> src/state.rs
  |
  | pub struct WeakLua(XWeak<ReentrantMutex<RawLua>>);
  |            ^^^^^^^
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<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
  |                                        ^^^^^^^^^^ required by this bound in `catch_unwind`