Skip to content

Commit 466b327

Browse files
committed
Re-generate compile error messages
1 parent dab2fe6 commit 466b327

2 files changed

Lines changed: 89 additions & 144 deletions

File tree

tests/compile/lua_norefunwindsafe.stderr

Lines changed: 53 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
1-
error[E0277]: the type `UnsafeCell<*mut lua_State>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
1+
error[E0277]: the type `UnsafeCell<mlua::state::RawLua>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
22
--> tests/compile/lua_norefunwindsafe.rs:7:18
33
|
44
7 | catch_unwind(|| lua.create_table().unwrap());
5-
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<*mut lua_State>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
5+
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<mlua::state::RawLua>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
66
| |
77
| required by a bound introduced by this call
88
|
9-
= help: within `mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<*mut lua_State>`
10-
note: required because it appears within the type `Cell<*mut lua_State>`
11-
--> $RUST/core/src/cell.rs
9+
= help: within `Lua`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<mlua::state::RawLua>`
10+
note: required because it appears within the type `lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>`
11+
--> $CARGO/lock_api-$VERSION/src/remutex.rs
1212
|
13-
| pub struct Cell<T: ?Sized> {
14-
| ^^^^
15-
note: required because it appears within the type `mlua::state::RawLua`
16-
--> src/state/raw.rs
13+
| pub struct ReentrantMutex<R, G, T: ?Sized> {
14+
| ^^^^^^^^^^^^^^
15+
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::RawLua>>`
16+
--> $RUST/alloc/src/sync.rs
1717
|
18-
| pub struct RawLua {
19-
| ^^^^^^
20-
note: required because it appears within the type `mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>`
21-
--> src/types/sync.rs
18+
| struct ArcInner<T: ?Sized> {
19+
| ^^^^^^^^
20+
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::RawLua>>>`
21+
--> $RUST/core/src/marker.rs
2222
|
23-
| pub(crate) struct ReentrantMutex<T>(T);
24-
| ^^^^^^^^^^^^^^
25-
= note: required for `Rc<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>` to implement `RefUnwindSafe`
23+
| pub struct PhantomData<T: PointeeSized>;
24+
| ^^^^^^^^^^^
25+
note: required because it appears within the type `Arc<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>`
26+
--> $RUST/alloc/src/sync.rs
27+
|
28+
| pub struct Arc<
29+
| ^^^
2630
note: required because it appears within the type `Lua`
2731
--> src/state.rs
2832
|
@@ -40,37 +44,45 @@ note: required by a bound in `std::panic::catch_unwind`
4044
| pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
4145
| ^^^^^^^^^^ required by this bound in `catch_unwind`
4246

43-
error[E0277]: the type `UnsafeCell<state::extra::ExtraData>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
47+
error[E0277]: the type `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
4448
--> tests/compile/lua_norefunwindsafe.rs:7:18
4549
|
4650
7 | catch_unwind(|| lua.create_table().unwrap());
47-
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<state::extra::ExtraData>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
51+
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
4852
| |
4953
| required by a bound introduced by this call
5054
|
51-
= help: the trait `RefUnwindSafe` is not implemented for `UnsafeCell<state::extra::ExtraData>`
52-
= note: required for `Rc<UnsafeCell<state::extra::ExtraData>>` to implement `RefUnwindSafe`
53-
note: required because it appears within the type `MaybeDangling<Rc<UnsafeCell<state::extra::ExtraData>>>`
54-
--> $RUST/core/src/mem/maybe_dangling.rs
55-
|
56-
| pub struct MaybeDangling<P: ?Sized>(P);
57-
| ^^^^^^^^^^^^^
58-
note: required because it appears within the type `ManuallyDrop<Rc<UnsafeCell<state::extra::ExtraData>>>`
59-
--> $RUST/core/src/mem/manually_drop.rs
60-
|
61-
| pub struct ManuallyDrop<T: ?Sized> {
62-
| ^^^^^^^^^^^^
63-
note: required because it appears within the type `mlua::state::RawLua`
64-
--> src/state/raw.rs
65-
|
66-
| pub struct RawLua {
67-
| ^^^^^^
68-
note: required because it appears within the type `mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>`
69-
--> src/types/sync.rs
70-
|
71-
| pub(crate) struct ReentrantMutex<T>(T);
72-
| ^^^^^^^^^^^^^^
73-
= note: required for `Rc<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>` to implement `RefUnwindSafe`
55+
= help: within `Lua`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<usize>`
56+
note: required because it appears within the type `Cell<usize>`
57+
--> $RUST/core/src/cell.rs
58+
|
59+
| pub struct Cell<T: ?Sized> {
60+
| ^^^^
61+
note: required because it appears within the type `lock_api::remutex::RawReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId>`
62+
--> $CARGO/lock_api-$VERSION/src/remutex.rs
63+
|
64+
| pub struct RawReentrantMutex<R, G> {
65+
| ^^^^^^^^^^^^^^^^^
66+
note: required because it appears within the type `lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>`
67+
--> $CARGO/lock_api-$VERSION/src/remutex.rs
68+
|
69+
| pub struct ReentrantMutex<R, G, T: ?Sized> {
70+
| ^^^^^^^^^^^^^^
71+
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::RawLua>>`
72+
--> $RUST/alloc/src/sync.rs
73+
|
74+
| struct ArcInner<T: ?Sized> {
75+
| ^^^^^^^^
76+
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::RawLua>>>`
77+
--> $RUST/core/src/marker.rs
78+
|
79+
| pub struct PhantomData<T: PointeeSized>;
80+
| ^^^^^^^^^^^
81+
note: required because it appears within the type `Arc<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>`
82+
--> $RUST/alloc/src/sync.rs
83+
|
84+
| pub struct Arc<
85+
| ^^^
7486
note: required because it appears within the type `Lua`
7587
--> src/state.rs
7688
|

tests/compile/ref_nounwindsafe.stderr

Lines changed: 36 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
error[E0277]: the type `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
1+
error[E0277]: the type `UnsafeCell<mlua::state::RawLua>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
22
--> tests/compile/ref_nounwindsafe.rs:8:18
33
|
44
8 | catch_unwind(move || table.set("a", "b").unwrap());
5-
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
5+
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<mlua::state::RawLua>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
66
| |
77
| required by a bound introduced by this call
88
|
9-
= help: within `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<usize>`
10-
note: required because it appears within the type `Cell<usize>`
11-
--> $RUST/core/src/cell.rs
9+
= help: within `alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<mlua::state::RawLua>`
10+
note: required because it appears within the type `lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>`
11+
--> $CARGO/lock_api-$VERSION/src/remutex.rs
1212
|
13-
| pub struct Cell<T: ?Sized> {
14-
| ^^^^
15-
note: required because it appears within the type `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>`
16-
--> $RUST/alloc/src/rc.rs
13+
| pub struct ReentrantMutex<R, G, T: ?Sized> {
14+
| ^^^^^^^^^^^^^^
15+
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::RawLua>>`
16+
--> $RUST/alloc/src/sync.rs
1717
|
18-
| struct RcInner<T: ?Sized> {
19-
| ^^^^^^^
20-
= note: required for `NonNull<rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>>` to implement `UnwindSafe`
21-
note: required because it appears within the type `std::rc::Weak<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>`
22-
--> $RUST/alloc/src/rc.rs
18+
| struct ArcInner<T: ?Sized> {
19+
| ^^^^^^^^
20+
= note: required for `NonNull<alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>>` to implement `UnwindSafe`
21+
note: required because it appears within the type `std::sync::Weak<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>`
22+
--> $RUST/alloc/src/sync.rs
2323
|
2424
| pub struct Weak<
2525
| ^^^^
@@ -49,105 +49,38 @@ note: required by a bound in `std::panic::catch_unwind`
4949
| pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
5050
| ^^^^^^^^^^ required by this bound in `catch_unwind`
5151

52-
error[E0277]: the type `UnsafeCell<*mut lua_State>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
52+
error[E0277]: the type `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
5353
--> tests/compile/ref_nounwindsafe.rs:8:18
5454
|
5555
8 | catch_unwind(move || table.set("a", "b").unwrap());
56-
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<*mut lua_State>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
56+
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
5757
| |
5858
| required by a bound introduced by this call
5959
|
60-
= help: within `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<*mut lua_State>`
61-
note: required because it appears within the type `Cell<*mut lua_State>`
60+
= help: within `alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<usize>`
61+
note: required because it appears within the type `Cell<usize>`
6262
--> $RUST/core/src/cell.rs
6363
|
6464
| pub struct Cell<T: ?Sized> {
6565
| ^^^^
66-
note: required because it appears within the type `mlua::state::RawLua`
67-
--> src/state/raw.rs
68-
|
69-
| pub struct RawLua {
70-
| ^^^^^^
71-
note: required because it appears within the type `mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>`
72-
--> src/types/sync.rs
73-
|
74-
| pub(crate) struct ReentrantMutex<T>(T);
75-
| ^^^^^^^^^^^^^^
76-
note: required because it appears within the type `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>`
77-
--> $RUST/alloc/src/rc.rs
78-
|
79-
| struct RcInner<T: ?Sized> {
80-
| ^^^^^^^
81-
= note: required for `NonNull<rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>>` to implement `UnwindSafe`
82-
note: required because it appears within the type `std::rc::Weak<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>`
83-
--> $RUST/alloc/src/rc.rs
84-
|
85-
| pub struct Weak<
86-
| ^^^^
87-
note: required because it appears within the type `WeakLua`
88-
--> src/state.rs
89-
|
90-
| pub struct WeakLua(XWeak<ReentrantMutex<RawLua>>);
91-
| ^^^^^^^
92-
note: required because it appears within the type `mlua::types::value_ref::ValueRef`
93-
--> src/types/value_ref.rs
94-
|
95-
| pub struct ValueRef {
96-
| ^^^^^^^^
97-
note: required because it appears within the type `LuaTable`
98-
--> src/table.rs
99-
|
100-
| pub struct Table(pub(crate) ValueRef);
101-
| ^^^^^
102-
note: required because it's used within this closure
103-
--> tests/compile/ref_nounwindsafe.rs:8:18
104-
|
105-
8 | catch_unwind(move || table.set("a", "b").unwrap());
106-
| ^^^^^^^
107-
note: required by a bound in `std::panic::catch_unwind`
108-
--> $RUST/std/src/panic.rs
109-
|
110-
| pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
111-
| ^^^^^^^^^^ required by this bound in `catch_unwind`
112-
113-
error[E0277]: the type `UnsafeCell<state::extra::ExtraData>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
114-
--> tests/compile/ref_nounwindsafe.rs:8:18
115-
|
116-
8 | catch_unwind(move || table.set("a", "b").unwrap());
117-
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<state::extra::ExtraData>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
118-
| |
119-
| required by a bound introduced by this call
120-
|
121-
= help: the trait `RefUnwindSafe` is not implemented for `UnsafeCell<state::extra::ExtraData>`
122-
= note: required for `Rc<UnsafeCell<state::extra::ExtraData>>` to implement `RefUnwindSafe`
123-
note: required because it appears within the type `MaybeDangling<Rc<UnsafeCell<state::extra::ExtraData>>>`
124-
--> $RUST/core/src/mem/maybe_dangling.rs
125-
|
126-
| pub struct MaybeDangling<P: ?Sized>(P);
127-
| ^^^^^^^^^^^^^
128-
note: required because it appears within the type `ManuallyDrop<Rc<UnsafeCell<state::extra::ExtraData>>>`
129-
--> $RUST/core/src/mem/manually_drop.rs
130-
|
131-
| pub struct ManuallyDrop<T: ?Sized> {
132-
| ^^^^^^^^^^^^
133-
note: required because it appears within the type `mlua::state::RawLua`
134-
--> src/state/raw.rs
135-
|
136-
| pub struct RawLua {
137-
| ^^^^^^
138-
note: required because it appears within the type `mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>`
139-
--> src/types/sync.rs
140-
|
141-
| pub(crate) struct ReentrantMutex<T>(T);
142-
| ^^^^^^^^^^^^^^
143-
note: required because it appears within the type `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>`
144-
--> $RUST/alloc/src/rc.rs
145-
|
146-
| struct RcInner<T: ?Sized> {
147-
| ^^^^^^^
148-
= note: required for `NonNull<rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>>` to implement `UnwindSafe`
149-
note: required because it appears within the type `std::rc::Weak<mlua::types::sync::inner::ReentrantMutex<mlua::state::RawLua>>`
150-
--> $RUST/alloc/src/rc.rs
66+
note: required because it appears within the type `lock_api::remutex::RawReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId>`
67+
--> $CARGO/lock_api-$VERSION/src/remutex.rs
68+
|
69+
| pub struct RawReentrantMutex<R, G> {
70+
| ^^^^^^^^^^^^^^^^^
71+
note: required because it appears within the type `lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>`
72+
--> $CARGO/lock_api-$VERSION/src/remutex.rs
73+
|
74+
| pub struct ReentrantMutex<R, G, T: ?Sized> {
75+
| ^^^^^^^^^^^^^^
76+
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::RawLua>>`
77+
--> $RUST/alloc/src/sync.rs
78+
|
79+
| struct ArcInner<T: ?Sized> {
80+
| ^^^^^^^^
81+
= note: required for `NonNull<alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>>` to implement `UnwindSafe`
82+
note: required because it appears within the type `std::sync::Weak<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>`
83+
--> $RUST/alloc/src/sync.rs
15184
|
15285
| pub struct Weak<
15386
| ^^^^

0 commit comments

Comments
 (0)