You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/compile/lua_norefunwindsafe.stderr
+29-51Lines changed: 29 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,28 @@
1
-
error[E0277]: the type `UnsafeCell<mlua::state::raw::RawLua>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
1
+
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
2
2
--> tests/compile/lua_norefunwindsafe.rs:7:18
3
3
|
4
4
7 | catch_unwind(|| lua.create_table().unwrap());
5
-
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<mlua::state::raw::RawLua>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
5
+
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<*mut lua_State>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
6
6
| |
7
7
| required by a bound introduced by this call
8
8
|
9
-
= help: within `Lua`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<mlua::state::raw::RawLua>`, which is required by `{closure@$DIR/tests/compile/lua_norefunwindsafe.rs:7:18: 7:20}: UnwindSafe`
10
-
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>`
11
-
--> $CARGO/lock_api-0.4.12/src/remutex.rs
12
-
|
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::raw::RawLua>>`
16
-
--> $RUST/alloc/src/sync.rs
9
+
= help: within `mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::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
17
12
|
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::raw::RawLua>>>`
21
-
--> $RUST/core/src/marker.rs
13
+
| pub struct Cell<T: ?Sized> {
14
+
| ^^^^
15
+
note: required because it appears within the type `mlua::state::raw::RawLua`
16
+
--> src/state/raw.rs
22
17
|
23
-
| pub struct PhantomData<T: ?Sized>;
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::raw::RawLua>>`
26
-
--> $RUST/alloc/src/sync.rs
18
+
| pub struct RawLua {
19
+
| ^^^^^^
20
+
note: required because it appears within the type `mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>`
21
+
--> src/types/sync.rs
27
22
|
28
-
| pub struct Arc<
29
-
| ^^^
23
+
| pub(crate) struct ReentrantMutex<T>(T);
24
+
| ^^^^^^^^^^^^^^
25
+
= note: required for `Rc<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>` to implement `RefUnwindSafe`
30
26
note: required because it appears within the type `Lua`
31
27
--> src/state.rs
32
28
|
@@ -44,45 +40,27 @@ note: required by a bound in `std::panic::catch_unwind`
| ^^^^^^^^^^ required by this bound in `catch_unwind`
46
42
47
-
error[E0277]: the type `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
43
+
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
48
44
--> tests/compile/lua_norefunwindsafe.rs:7:18
49
45
|
50
46
7 | catch_unwind(|| lua.create_table().unwrap());
51
-
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
47
+
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<mlua::state::extra::ExtraData>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
52
48
| |
53
49
| required by a bound introduced by this call
54
50
|
55
-
= help: within `Lua`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<usize>`, which is required by `{closure@$DIR/tests/compile/lua_norefunwindsafe.rs:7:18: 7:20}: UnwindSafe`
56
-
note: required because it appears within the type `Cell<usize>`
57
-
--> $RUST/core/src/cell.rs
51
+
= help: the trait `RefUnwindSafe` is not implemented for `UnsafeCell<mlua::state::extra::ExtraData>`
52
+
= note: required for `Rc<UnsafeCell<mlua::state::extra::ExtraData>>` to implement `RefUnwindSafe`
53
+
note: required because it appears within the type `mlua::state::raw::RawLua`
54
+
--> src/state/raw.rs
58
55
|
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-0.4.12/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::raw::RawLua>`
67
-
--> $CARGO/lock_api-0.4.12/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::raw::RawLua>>`
72
-
--> $RUST/alloc/src/sync.rs
56
+
| pub struct RawLua {
57
+
| ^^^^^^
58
+
note: required because it appears within the type `mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>`
59
+
--> src/types/sync.rs
73
60
|
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::raw::RawLua>>>`
77
-
--> $RUST/core/src/marker.rs
78
-
|
79
-
| pub struct PhantomData<T: ?Sized>;
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::raw::RawLua>>`
82
-
--> $RUST/alloc/src/sync.rs
83
-
|
84
-
| pub struct Arc<
85
-
| ^^^
61
+
| pub(crate) struct ReentrantMutex<T>(T);
62
+
| ^^^^^^^^^^^^^^
63
+
= note: required for `Rc<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>` to implement `RefUnwindSafe`
86
64
note: required because it appears within the type `Lua`
Copy file name to clipboardExpand all lines: tests/compile/non_send.stderr
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ error[E0277]: `Rc<Cell<i32>>` cannot be sent between threads safely
8
8
| | within this `{closure@$DIR/tests/compile/non_send.rs:11:25: 11:37}`
9
9
| required by a bound introduced by this call
10
10
|
11
-
= help: within `{closure@$DIR/tests/compile/non_send.rs:11:25: 11:37}`, the trait `Send` is not implemented for `Rc<Cell<i32>>`, which is required by `{closure@$DIR/tests/compile/non_send.rs:11:25: 11:37}: MaybeSend`
11
+
= help: within `{closure@$DIR/tests/compile/non_send.rs:11:25: 11:37}`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
12
12
note: required because it's used within this closure
error[E0277]: the type `UnsafeCell<mlua::state::raw::RawLua>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
1
+
error[E0277]: the type `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<mlua::state::raw::RawLua>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
5
+
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
6
6
| |
7
7
| required by a bound introduced by this call
8
8
|
9
-
= help: within `alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::raw::RawLua>>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<mlua::state::raw::RawLua>`, which is required by `{closure@$DIR/tests/compile/ref_nounwindsafe.rs:8:18: 8:25}: UnwindSafe`
10
-
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>`
11
-
--> $CARGO/lock_api-0.4.12/src/remutex.rs
9
+
= help: within `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::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
12
12
|
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::raw::RawLua>>`
16
-
--> $RUST/alloc/src/sync.rs
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::raw::RawLua>>`
16
+
--> $RUST/alloc/src/rc.rs
17
17
|
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::raw::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::raw::RawLua>>`
22
-
--> $RUST/alloc/src/sync.rs
18
+
| struct RcInner<T: ?Sized> {
19
+
| ^^^^^^^
20
+
= note: required for `NonNull<rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>>` to implement `UnwindSafe`
21
+
note: required because it appears within the type `std::rc::Weak<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>`
22
+
--> $RUST/alloc/src/rc.rs
23
23
|
24
24
| pub struct Weak<
25
25
| ^^^^
26
-
note: required because it appears within the type `mlua::state::WeakLua`
26
+
note: required because it appears within the type `WeakLua`
| ^^^^^^^^^^ required by this bound in `catch_unwind`
51
51
52
-
error[E0277]: the type `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
52
+
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
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
56
+
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<*mut lua_State>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
57
57
| |
58
58
| required by a bound introduced by this call
59
59
|
60
-
= help: within `alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::raw::RawLua>>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<usize>`, which is required by `{closure@$DIR/tests/compile/ref_nounwindsafe.rs:8:18: 8:25}: UnwindSafe`
61
-
note: required because it appears within the type `Cell<usize>`
60
+
= help: within `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::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>`
62
62
--> $RUST/core/src/cell.rs
63
63
|
64
64
| pub struct Cell<T: ?Sized> {
65
65
| ^^^^
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-0.4.12/src/remutex.rs
66
+
note: required because it appears within the type `mlua::state::raw::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::raw::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::raw::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::raw::RawLua>>>` to implement `UnwindSafe`
82
+
note: required because it appears within the type `std::rc::Weak<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>`
83
+
--> $RUST/alloc/src/rc.rs
84
+
|
85
+
| pub struct Weak<
86
+
| ^^^^
87
+
note: required because it appears within the type `WeakLua`
| ^^^^^^^^^^ required by this bound in `catch_unwind`
112
+
113
+
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
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<mlua::state::extra::ExtraData>` may contain interior mutability and a reference may not be safely transferrable 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<mlua::state::extra::ExtraData>`
122
+
= note: required for `Rc<UnsafeCell<mlua::state::extra::ExtraData>>` to implement `RefUnwindSafe`
123
+
note: required because it appears within the type `mlua::state::raw::RawLua`
124
+
--> src/state/raw.rs
68
125
|
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::raw::RawLua>`
72
-
--> $CARGO/lock_api-0.4.12/src/remutex.rs
126
+
| pub struct RawLua {
127
+
| ^^^^^^
128
+
note: required because it appears within the type `mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>`
129
+
--> src/types/sync.rs
73
130
|
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::raw::RawLua>>`
77
-
--> $RUST/alloc/src/sync.rs
131
+
| pub(crate) struct ReentrantMutex<T>(T);
132
+
| ^^^^^^^^^^^^^^
133
+
note: required because it appears within the type `rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>`
134
+
--> $RUST/alloc/src/rc.rs
78
135
|
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::raw::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::raw::RawLua>>`
83
-
--> $RUST/alloc/src/sync.rs
136
+
| struct RcInner<T: ?Sized> {
137
+
| ^^^^^^^
138
+
= note: required for `NonNull<rc::RcInner<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>>` to implement `UnwindSafe`
139
+
note: required because it appears within the type `std::rc::Weak<mlua::types::sync::inner::ReentrantMutex<mlua::state::raw::RawLua>>`
140
+
--> $RUST/alloc/src/rc.rs
84
141
|
85
142
| pub struct Weak<
86
143
| ^^^^
87
-
note: required because it appears within the type `mlua::state::WeakLua`
144
+
note: required because it appears within the type `WeakLua`
0 commit comments