diff --git a/tests/compile/lua_norefunwindsafe.stderr b/tests/compile/lua_norefunwindsafe.stderr index 6dff810..86ccd3c 100644 --- a/tests/compile/lua_norefunwindsafe.stderr +++ b/tests/compile/lua_norefunwindsafe.stderr @@ -4,8 +4,13 @@ error[E0277]: the type `std::cell::UnsafeCell<()>` may contain interior mutabili 7 | catch_unwind(|| lua.create_table().unwrap()); | ^^^^^^^^^^^^ `std::cell::UnsafeCell<()>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | - = help: within `mlua::lua::Lua`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<()>` + ::: $RUST/src/libstd/panic.rs + | + | pub fn catch_unwind R + UnwindSafe, R>(f: F) -> Result { + | ---------- required by this bound in `std::panic::catch_unwind` + | + = help: within `mlua::Lua`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<()>` = note: required because it appears within the type `std::marker::PhantomData>` - = note: required because it appears within the type `mlua::lua::Lua` - = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&mlua::lua::Lua` - = note: required because it appears within the type `[closure@$DIR/tests/compile/lua_norefunwindsafe.rs:7:18: 7:48 lua:&mlua::lua::Lua]` + = note: required because it appears within the type `mlua::Lua` + = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&mlua::Lua` + = note: required because it appears within the type `[closure@$DIR/tests/compile/lua_norefunwindsafe.rs:7:18: 7:48 lua:&mlua::Lua]` diff --git a/tests/compile/ref_nounwindsafe.stderr b/tests/compile/ref_nounwindsafe.stderr index 0b1b649..ced38a5 100644 --- a/tests/compile/ref_nounwindsafe.stderr +++ b/tests/compile/ref_nounwindsafe.stderr @@ -4,10 +4,15 @@ error[E0277]: the type `std::cell::UnsafeCell<()>` may contain interior mutabili 8 | catch_unwind(move || table.set("a", "b").unwrap()); | ^^^^^^^^^^^^ `std::cell::UnsafeCell<()>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | - = help: within `mlua::lua::Lua`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<()>` + ::: $RUST/src/libstd/panic.rs + | + | pub fn catch_unwind R + UnwindSafe, R>(f: F) -> Result { + | ---------- required by this bound in `std::panic::catch_unwind` + | + = help: within `mlua::Lua`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<()>` = note: required because it appears within the type `std::marker::PhantomData>` - = note: required because it appears within the type `mlua::lua::Lua` - = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&mlua::lua::Lua` + = note: required because it appears within the type `mlua::Lua` + = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&mlua::Lua` = note: required because it appears within the type `mlua::types::LuaRef<'_>` - = note: required because it appears within the type `mlua::table::Table<'_>` - = note: required because it appears within the type `[closure@$DIR/tests/compile/ref_nounwindsafe.rs:8:18: 8:54 table:mlua::table::Table<'_>]` + = note: required because it appears within the type `mlua::Table<'_>` + = note: required because it appears within the type `[closure@$DIR/tests/compile/ref_nounwindsafe.rs:8:18: 8:54 table:mlua::Table<'_>]` diff --git a/tests/compile/scope_callback_inner.stderr b/tests/compile/scope_callback_inner.stderr index 4f09ca8..1e147b3 100644 --- a/tests/compile/scope_callback_inner.stderr +++ b/tests/compile/scope_callback_inner.stderr @@ -19,7 +19,7 @@ error[E0373]: closure may outlive the current function, but it borrows `inner`, --> $DIR/scope_callback_inner.rs:8:34 | 5 | lua.scope(|scope| { - | ----- has type `&mlua::scope::Scope<'_, '2>` + | ----- has type `&mlua::Scope<'_, '2>` ... 8 | .create_function_mut(|_, t: Table| { | ^^^^^^^^^^^^^ may outlive borrowed value `inner` diff --git a/tests/compile/scope_callback_outer.stderr b/tests/compile/scope_callback_outer.stderr index 676b4b4..aa4bdac 100644 --- a/tests/compile/scope_callback_outer.stderr +++ b/tests/compile/scope_callback_outer.stderr @@ -27,4 +27,4 @@ error[E0597]: `outer` does not live long enough | - | | | `outer` dropped here while still borrowed - | borrow might be used here, when `outer` is dropped and runs the destructor for type `std::option::Option>` + | borrow might be used here, when `outer` is dropped and runs the destructor for type `std::option::Option>` diff --git a/tests/compile/scope_invariance.stderr b/tests/compile/scope_invariance.stderr index ee2a525..f8f74dd 100644 --- a/tests/compile/scope_invariance.stderr +++ b/tests/compile/scope_invariance.stderr @@ -2,7 +2,7 @@ error[E0373]: closure may outlive the current function, but it borrows `test`, w --> $DIR/scope_invariance.rs:14:38 | 9 | lua.scope(|scope| { - | ----- has type `&mlua::scope::Scope<'_, '1>` + | ----- has type `&mlua::Scope<'_, '1>` ... 14 | .create_function_mut(|_, ()| { | ^^^^^^^ may outlive borrowed value `test` diff --git a/tests/compile/scope_userdata_borrow.stderr b/tests/compile/scope_userdata_borrow.stderr index 1e422f4..1f79346 100644 --- a/tests/compile/scope_userdata_borrow.stderr +++ b/tests/compile/scope_userdata_borrow.stderr @@ -2,7 +2,7 @@ error[E0597]: `ibad` does not live long enough --> $DIR/scope_userdata_borrow.rs:15:56 | 11 | lua.scope(|scope| { - | ----- has type `&mlua::scope::Scope<'_, '1>` + | ----- has type `&mlua::Scope<'_, '1>` ... 15 | scope.create_nonstatic_userdata(MyUserData(&ibad)).unwrap(); | -------------------------------------------^^^^^--