mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
102 lines
5.2 KiB
Plaintext
102 lines
5.2 KiB
Plaintext
error[E0277]: the type `UnsafeCell<mlua::state::raw::RawLua>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
|
|
--> tests/compile/lua_norefunwindsafe.rs:7:18
|
|
|
|
|
7 | catch_unwind(|| lua.create_table().unwrap());
|
|
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<mlua::state::raw::RawLua>` 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 `Lua`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<mlua::state::raw::RawLua>`
|
|
note: required because it appears within the type `lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::raw::RawLua>`
|
|
--> $CARGO/lock_api-$VERSION/src/remutex.rs
|
|
|
|
|
| pub struct ReentrantMutex<R, G, T: ?Sized> {
|
|
| ^^^^^^^^^^^^^^
|
|
note: required because it appears within the type `alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::raw::RawLua>>`
|
|
--> $RUST/alloc/src/sync.rs
|
|
|
|
|
| struct ArcInner<T: ?Sized> {
|
|
| ^^^^^^^^
|
|
note: required because it appears within the type `PhantomData<alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::raw::RawLua>>>`
|
|
--> $RUST/core/src/marker.rs
|
|
|
|
|
| pub struct PhantomData<T: PointeeSized>;
|
|
| ^^^^^^^^^^^
|
|
note: required because it appears within the type `Arc<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::raw::RawLua>>`
|
|
--> $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<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
|
|
| ^^^^^^^^^^ required by this bound in `catch_unwind`
|
|
|
|
error[E0277]: the type `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
|
|
--> tests/compile/lua_norefunwindsafe.rs:7:18
|
|
|
|
|
7 | catch_unwind(|| lua.create_table().unwrap());
|
|
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<usize>` 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 `Lua`, 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 `lock_api::remutex::RawReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId>`
|
|
--> $CARGO/lock_api-$VERSION/src/remutex.rs
|
|
|
|
|
| pub struct RawReentrantMutex<R, G> {
|
|
| ^^^^^^^^^^^^^^^^^
|
|
note: required because it appears within the type `lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::raw::RawLua>`
|
|
--> $CARGO/lock_api-$VERSION/src/remutex.rs
|
|
|
|
|
| pub struct ReentrantMutex<R, G, T: ?Sized> {
|
|
| ^^^^^^^^^^^^^^
|
|
note: required because it appears within the type `alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::raw::RawLua>>`
|
|
--> $RUST/alloc/src/sync.rs
|
|
|
|
|
| struct ArcInner<T: ?Sized> {
|
|
| ^^^^^^^^
|
|
note: required because it appears within the type `PhantomData<alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::raw::RawLua>>>`
|
|
--> $RUST/core/src/marker.rs
|
|
|
|
|
| pub struct PhantomData<T: PointeeSized>;
|
|
| ^^^^^^^^^^^
|
|
note: required because it appears within the type `Arc<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::raw::RawLua>>`
|
|
--> $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<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
|
|
| ^^^^^^^^^^ required by this bound in `catch_unwind`
|