@@ -8,13 +8,13 @@ error[E0277]: the trait bound `NSObject: ImplementedBy<NSObject>` is not satisfi
8
8
|
9
9
= help: the following other types implement trait `ImplementedBy<T>`:
10
10
(dyn NSObjectProtocol + 'static)
11
+ (dyn NSObjectProtocol + Send + 'static)
12
+ (dyn NSObjectProtocol + Sync + 'static)
13
+ (dyn NSObjectProtocol + Send + Sync + 'static)
11
14
(dyn NSAccessibilityColor + 'static)
12
15
(dyn NSAccessibilityCustomRotorItemSearchDelegate + 'static)
13
16
(dyn NSAccessibilityElementProtocol + 'static)
14
17
(dyn NSAccessibilityGroup + 'static)
15
- (dyn NSAccessibilityButton + 'static)
16
- (dyn NSAccessibilitySwitch + 'static)
17
- (dyn NSAccessibilityRadioButton + 'static)
18
18
and $N others
19
19
note: required by a bound in `ProtocolObject::<P>::from_ref`
20
20
--> $WORKSPACE/crates/objc2/src/runtime/protocol_object.rs
@@ -35,13 +35,13 @@ error[E0277]: the trait bound `dyn Send: ImplementedBy<NSObject>` is not satisfi
35
35
|
36
36
= help: the following other types implement trait `ImplementedBy<T>`:
37
37
(dyn NSObjectProtocol + 'static)
38
+ (dyn NSObjectProtocol + Send + 'static)
39
+ (dyn NSObjectProtocol + Sync + 'static)
40
+ (dyn NSObjectProtocol + Send + Sync + 'static)
38
41
(dyn NSAccessibilityColor + 'static)
39
42
(dyn NSAccessibilityCustomRotorItemSearchDelegate + 'static)
40
43
(dyn NSAccessibilityElementProtocol + 'static)
41
44
(dyn NSAccessibilityGroup + 'static)
42
- (dyn NSAccessibilityButton + 'static)
43
- (dyn NSAccessibilitySwitch + 'static)
44
- (dyn NSAccessibilityRadioButton + 'static)
45
45
and $N others
46
46
note: required by a bound in `ProtocolObject::<P>::from_ref`
47
47
--> $WORKSPACE/crates/objc2/src/runtime/protocol_object.rs
@@ -62,13 +62,13 @@ error[E0277]: the trait bound `dyn Foo: ImplementedBy<NSObject>` is not satisfie
62
62
|
63
63
= help: the following other types implement trait `ImplementedBy<T>`:
64
64
(dyn NSObjectProtocol + 'static)
65
+ (dyn NSObjectProtocol + Send + 'static)
66
+ (dyn NSObjectProtocol + Sync + 'static)
67
+ (dyn NSObjectProtocol + Send + Sync + 'static)
65
68
(dyn NSAccessibilityColor + 'static)
66
69
(dyn NSAccessibilityCustomRotorItemSearchDelegate + 'static)
67
70
(dyn NSAccessibilityElementProtocol + 'static)
68
71
(dyn NSAccessibilityGroup + 'static)
69
- (dyn NSAccessibilityButton + 'static)
70
- (dyn NSAccessibilitySwitch + 'static)
71
- (dyn NSAccessibilityRadioButton + 'static)
72
72
and $N others
73
73
note: required by a bound in `ProtocolObject::<P>::from_ref`
74
74
--> $WORKSPACE/crates/objc2/src/runtime/protocol_object.rs
@@ -79,24 +79,52 @@ note: required by a bound in `ProtocolObject::<P>::from_ref`
79
79
| P: ImplementedBy<T>,
80
80
| ^^^^^^^^^^^^^^^^ required by this bound in `ProtocolObject::<P>::from_ref`
81
81
82
- error[E0277]: the trait bound `dyn NSObjectProtocol + Send: ImplementedBy<NSObject >` is not satisfied
82
+ error[E0277]: `*const UnsafeCell<() >` cannot be sent between threads safely
83
83
--> ui/protocol_object_only_protocols.rs
84
84
|
85
85
| let _: &ProtocolObject<dyn NSObjectProtocol + Send> = ProtocolObject::from_ref(&*obj);
86
- | ------------------------ ^^^^^ the trait `ImplementedBy<NSObject >` is not implemented for `dyn NSObjectProtocol + Send`
86
+ | ------------------------ ^^^^^ `*const UnsafeCell<() >` cannot be sent between threads safely
87
87
| |
88
88
| required by a bound introduced by this call
89
89
|
90
+ = help: within `NSObject`, the trait `Send` is not implemented for `*const UnsafeCell<()>`
90
91
= help: the following other types implement trait `ImplementedBy<T>`:
91
92
(dyn NSObjectProtocol + 'static)
93
+ (dyn NSObjectProtocol + Send + 'static)
94
+ (dyn NSObjectProtocol + Sync + 'static)
95
+ (dyn NSObjectProtocol + Send + Sync + 'static)
92
96
(dyn NSAccessibilityColor + 'static)
93
97
(dyn NSAccessibilityCustomRotorItemSearchDelegate + 'static)
94
98
(dyn NSAccessibilityElementProtocol + 'static)
95
99
(dyn NSAccessibilityGroup + 'static)
96
- (dyn NSAccessibilityButton + 'static)
97
- (dyn NSAccessibilitySwitch + 'static)
98
- (dyn NSAccessibilityRadioButton + 'static)
99
100
and $N others
101
+ = note: required because it appears within the type `(*const UnsafeCell<()>, PhantomPinned)`
102
+ note: required because it appears within the type `PhantomData<(*const UnsafeCell<()>, PhantomPinned)>`
103
+ --> $RUST/core/src/marker.rs
104
+ |
105
+ | pub struct PhantomData<T: ?Sized>;
106
+ | ^^^^^^^^^^^
107
+ note: required because it appears within the type `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
108
+ --> $RUST/core/src/cell.rs
109
+ |
110
+ | pub struct UnsafeCell<T: ?Sized> {
111
+ | ^^^^^^^^^^
112
+ note: required because it appears within the type `objc_object`
113
+ --> $WORKSPACE/crates/objc-sys/src/object.rs
114
+ |
115
+ | pub struct objc_object {
116
+ | ^^^^^^^^^^^
117
+ note: required because it appears within the type `AnyObject`
118
+ --> $WORKSPACE/crates/objc2/src/runtime/mod.rs
119
+ |
120
+ | pub struct AnyObject(ffi::objc_object);
121
+ | ^^^^^^^^^
122
+ note: required because it appears within the type `NSObject`
123
+ --> $WORKSPACE/crates/objc2/src/runtime/nsobject.rs
124
+ |
125
+ | pub struct NSObject {
126
+ | ^^^^^^^^
127
+ = note: required for `dyn NSObjectProtocol + Send` to implement `ImplementedBy<NSObject>`
100
128
note: required by a bound in `ProtocolObject::<P>::from_ref`
101
129
--> $WORKSPACE/crates/objc2/src/runtime/protocol_object.rs
102
130
|
@@ -106,24 +134,85 @@ note: required by a bound in `ProtocolObject::<P>::from_ref`
106
134
| P: ImplementedBy<T>,
107
135
| ^^^^^^^^^^^^^^^^ required by this bound in `ProtocolObject::<P>::from_ref`
108
136
109
- error[E0277]: the trait bound `dyn NSObjectProtocol + Sync: ImplementedBy<NSObject>` is not satisfied
137
+ error[E0277]: `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
110
138
--> ui/protocol_object_only_protocols.rs
111
139
|
112
140
| let _: &ProtocolObject<dyn NSObjectProtocol + Sync> = ProtocolObject::from_ref(&*obj);
113
- | ------------------------ ^^^^^ the trait `ImplementedBy<NSObject>` is not implemented for `dyn NSObjectProtocol + Sync`
141
+ | ------------------------ ^^^^^ `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
114
142
| |
115
143
| required by a bound introduced by this call
116
144
|
145
+ = help: within `NSObject`, the trait `Sync` is not implemented for `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
146
+ = help: the following other types implement trait `ImplementedBy<T>`:
147
+ (dyn NSObjectProtocol + 'static)
148
+ (dyn NSObjectProtocol + Send + 'static)
149
+ (dyn NSObjectProtocol + Sync + 'static)
150
+ (dyn NSObjectProtocol + Send + Sync + 'static)
151
+ (dyn NSAccessibilityColor + 'static)
152
+ (dyn NSAccessibilityCustomRotorItemSearchDelegate + 'static)
153
+ (dyn NSAccessibilityElementProtocol + 'static)
154
+ (dyn NSAccessibilityGroup + 'static)
155
+ and $N others
156
+ note: required because it appears within the type `objc_object`
157
+ --> $WORKSPACE/crates/objc-sys/src/object.rs
158
+ |
159
+ | pub struct objc_object {
160
+ | ^^^^^^^^^^^
161
+ note: required because it appears within the type `AnyObject`
162
+ --> $WORKSPACE/crates/objc2/src/runtime/mod.rs
163
+ |
164
+ | pub struct AnyObject(ffi::objc_object);
165
+ | ^^^^^^^^^
166
+ note: required because it appears within the type `NSObject`
167
+ --> $WORKSPACE/crates/objc2/src/runtime/nsobject.rs
168
+ |
169
+ | pub struct NSObject {
170
+ | ^^^^^^^^
171
+ = note: required for `dyn NSObjectProtocol + Sync` to implement `ImplementedBy<NSObject>`
172
+ note: required by a bound in `ProtocolObject::<P>::from_ref`
173
+ --> $WORKSPACE/crates/objc2/src/runtime/protocol_object.rs
174
+ |
175
+ | pub fn from_ref<T: ?Sized + Message>(obj: &T) -> &Self
176
+ | -------- required by a bound in this associated function
177
+ | where
178
+ | P: ImplementedBy<T>,
179
+ | ^^^^^^^^^^^^^^^^ required by this bound in `ProtocolObject::<P>::from_ref`
180
+
181
+ error[E0277]: `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
182
+ --> ui/protocol_object_only_protocols.rs
183
+ |
184
+ | let _: &ProtocolObject<dyn NSObjectProtocol + Send + Sync> = ProtocolObject::from_ref(&*obj);
185
+ | ------------------------ ^^^^^ `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>` cannot be shared between threads safely
186
+ | |
187
+ | required by a bound introduced by this call
188
+ |
189
+ = help: within `NSObject`, the trait `Sync` is not implemented for `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
117
190
= help: the following other types implement trait `ImplementedBy<T>`:
118
191
(dyn NSObjectProtocol + 'static)
192
+ (dyn NSObjectProtocol + Send + 'static)
193
+ (dyn NSObjectProtocol + Sync + 'static)
194
+ (dyn NSObjectProtocol + Send + Sync + 'static)
119
195
(dyn NSAccessibilityColor + 'static)
120
196
(dyn NSAccessibilityCustomRotorItemSearchDelegate + 'static)
121
197
(dyn NSAccessibilityElementProtocol + 'static)
122
198
(dyn NSAccessibilityGroup + 'static)
123
- (dyn NSAccessibilityButton + 'static)
124
- (dyn NSAccessibilitySwitch + 'static)
125
- (dyn NSAccessibilityRadioButton + 'static)
126
199
and $N others
200
+ note: required because it appears within the type `objc_object`
201
+ --> $WORKSPACE/crates/objc-sys/src/object.rs
202
+ |
203
+ | pub struct objc_object {
204
+ | ^^^^^^^^^^^
205
+ note: required because it appears within the type `AnyObject`
206
+ --> $WORKSPACE/crates/objc2/src/runtime/mod.rs
207
+ |
208
+ | pub struct AnyObject(ffi::objc_object);
209
+ | ^^^^^^^^^
210
+ note: required because it appears within the type `NSObject`
211
+ --> $WORKSPACE/crates/objc2/src/runtime/nsobject.rs
212
+ |
213
+ | pub struct NSObject {
214
+ | ^^^^^^^^
215
+ = note: required for `dyn NSObjectProtocol + Send + Sync` to implement `ImplementedBy<NSObject>`
127
216
note: required by a bound in `ProtocolObject::<P>::from_ref`
128
217
--> $WORKSPACE/crates/objc2/src/runtime/protocol_object.rs
129
218
|
@@ -133,24 +222,52 @@ note: required by a bound in `ProtocolObject::<P>::from_ref`
133
222
| P: ImplementedBy<T>,
134
223
| ^^^^^^^^^^^^^^^^ required by this bound in `ProtocolObject::<P>::from_ref`
135
224
136
- error[E0277]: the trait bound `dyn NSObjectProtocol + Send + Sync: ImplementedBy<NSObject >` is not satisfied
225
+ error[E0277]: `*const UnsafeCell<() >` cannot be sent between threads safely
137
226
--> ui/protocol_object_only_protocols.rs
138
227
|
139
228
| let _: &ProtocolObject<dyn NSObjectProtocol + Send + Sync> = ProtocolObject::from_ref(&*obj);
140
- | ------------------------ ^^^^^ the trait `ImplementedBy<NSObject >` is not implemented for `dyn NSObjectProtocol + Send + Sync`
229
+ | ------------------------ ^^^^^ `*const UnsafeCell<() >` cannot be sent between threads safely
141
230
| |
142
231
| required by a bound introduced by this call
143
232
|
233
+ = help: within `NSObject`, the trait `Send` is not implemented for `*const UnsafeCell<()>`
144
234
= help: the following other types implement trait `ImplementedBy<T>`:
145
235
(dyn NSObjectProtocol + 'static)
236
+ (dyn NSObjectProtocol + Send + 'static)
237
+ (dyn NSObjectProtocol + Sync + 'static)
238
+ (dyn NSObjectProtocol + Send + Sync + 'static)
146
239
(dyn NSAccessibilityColor + 'static)
147
240
(dyn NSAccessibilityCustomRotorItemSearchDelegate + 'static)
148
241
(dyn NSAccessibilityElementProtocol + 'static)
149
242
(dyn NSAccessibilityGroup + 'static)
150
- (dyn NSAccessibilityButton + 'static)
151
- (dyn NSAccessibilitySwitch + 'static)
152
- (dyn NSAccessibilityRadioButton + 'static)
153
243
and $N others
244
+ = note: required because it appears within the type `(*const UnsafeCell<()>, PhantomPinned)`
245
+ note: required because it appears within the type `PhantomData<(*const UnsafeCell<()>, PhantomPinned)>`
246
+ --> $RUST/core/src/marker.rs
247
+ |
248
+ | pub struct PhantomData<T: ?Sized>;
249
+ | ^^^^^^^^^^^
250
+ note: required because it appears within the type `UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>`
251
+ --> $RUST/core/src/cell.rs
252
+ |
253
+ | pub struct UnsafeCell<T: ?Sized> {
254
+ | ^^^^^^^^^^
255
+ note: required because it appears within the type `objc_object`
256
+ --> $WORKSPACE/crates/objc-sys/src/object.rs
257
+ |
258
+ | pub struct objc_object {
259
+ | ^^^^^^^^^^^
260
+ note: required because it appears within the type `AnyObject`
261
+ --> $WORKSPACE/crates/objc2/src/runtime/mod.rs
262
+ |
263
+ | pub struct AnyObject(ffi::objc_object);
264
+ | ^^^^^^^^^
265
+ note: required because it appears within the type `NSObject`
266
+ --> $WORKSPACE/crates/objc2/src/runtime/nsobject.rs
267
+ |
268
+ | pub struct NSObject {
269
+ | ^^^^^^^^
270
+ = note: required for `dyn NSObjectProtocol + Send + Sync` to implement `ImplementedBy<NSObject>`
154
271
note: required by a bound in `ProtocolObject::<P>::from_ref`
155
272
--> $WORKSPACE/crates/objc2/src/runtime/protocol_object.rs
156
273
|
@@ -198,13 +315,13 @@ error[E0277]: the trait bound `dyn NSCopying + Send: ImplementedBy<NSObject>` is
198
315
|
199
316
= help: the following other types implement trait `ImplementedBy<T>`:
200
317
(dyn NSObjectProtocol + 'static)
318
+ (dyn NSObjectProtocol + Send + 'static)
319
+ (dyn NSObjectProtocol + Sync + 'static)
320
+ (dyn NSObjectProtocol + Send + Sync + 'static)
201
321
(dyn NSAccessibilityColor + 'static)
202
322
(dyn NSAccessibilityCustomRotorItemSearchDelegate + 'static)
203
323
(dyn NSAccessibilityElementProtocol + 'static)
204
324
(dyn NSAccessibilityGroup + 'static)
205
- (dyn NSAccessibilityButton + 'static)
206
- (dyn NSAccessibilitySwitch + 'static)
207
- (dyn NSAccessibilityRadioButton + 'static)
208
325
and $N others
209
326
note: required by a bound in `ProtocolObject::<P>::from_ref`
210
327
--> $WORKSPACE/crates/objc2/src/runtime/protocol_object.rs
0 commit comments