@@ -18,7 +18,7 @@ impl<T: ?Sized> UnwindSafe for UnsafeIgnoreAutoTraits<T> {}
18
18
__inner_extern_class ! (
19
19
#[ derive( PartialEq , Eq , Hash ) ]
20
20
#[ cfg( feature = "Foundation_NSArray" ) ]
21
- pub struct NSArray <ObjectType : Message = AnyObject > {
21
+ pub struct NSArray <ObjectType : ? Sized = AnyObject > {
22
22
// SAFETY: Auto traits specified below.
23
23
__superclass: UnsafeIgnoreAutoTraits <NSObject >,
24
24
/// `NSArray` and `NSMutableArray` have `Id`-like storage.
@@ -84,7 +84,7 @@ __inner_extern_class!(
84
84
}
85
85
86
86
#[ cfg( feature = "Foundation_NSArray" ) ]
87
- unsafe impl <ObjectType : Message > ClassType for NSArray <ObjectType > {
87
+ unsafe impl <ObjectType : ? Sized + Message > ClassType for NSArray <ObjectType > {
88
88
type Super = NSObject ;
89
89
type Mutability = ImmutableWithMutableSubclass <NSMutableArray <ObjectType >>;
90
90
@@ -101,13 +101,13 @@ __inner_extern_class!(
101
101
__inner_extern_class ! (
102
102
#[ derive( PartialEq , Eq , Hash ) ]
103
103
#[ cfg( feature = "Foundation_NSArray" ) ]
104
- pub struct NSMutableArray <ObjectType : Message = AnyObject > {
104
+ pub struct NSMutableArray <ObjectType : ? Sized = AnyObject > {
105
105
// Inherit auto traits from superclass.
106
106
__superclass: NSArray <ObjectType >,
107
107
}
108
108
109
109
#[ cfg( feature = "Foundation_NSArray" ) ]
110
- unsafe impl <ObjectType : Message > ClassType for NSMutableArray <ObjectType > {
110
+ unsafe impl <ObjectType : ? Sized + Message > ClassType for NSMutableArray <ObjectType > {
111
111
#[ inherits( NSObject ) ]
112
112
type Super = NSArray <ObjectType >;
113
113
type Mutability = MutableWithImmutableSuperclass <NSArray <ObjectType >>;
@@ -125,7 +125,7 @@ __inner_extern_class!(
125
125
__inner_extern_class ! (
126
126
#[ derive( PartialEq , Eq , Hash ) ]
127
127
#[ cfg( feature = "Foundation_NSDictionary" ) ]
128
- pub struct NSDictionary <KeyType : Message = AnyObject , ObjectType : Message = AnyObject > {
128
+ pub struct NSDictionary <KeyType : ? Sized = AnyObject , ObjectType : ? Sized = AnyObject > {
129
129
// SAFETY: Auto traits specified below.
130
130
__superclass: UnsafeIgnoreAutoTraits <NSObject >,
131
131
// Same as if the dictionary was implemented with:
@@ -134,7 +134,9 @@ __inner_extern_class!(
134
134
}
135
135
136
136
#[ cfg( feature = "Foundation_NSDictionary" ) ]
137
- unsafe impl <KeyType : Message , ObjectType : Message > ClassType for NSDictionary <KeyType , ObjectType > {
137
+ unsafe impl <KeyType : ?Sized + Message , ObjectType : ?Sized + Message > ClassType
138
+ for NSDictionary <KeyType , ObjectType >
139
+ {
138
140
type Super = NSObject ;
139
141
type Mutability = ImmutableWithMutableSubclass <NSMutableDictionary <KeyType , ObjectType >>;
140
142
@@ -151,13 +153,13 @@ __inner_extern_class!(
151
153
__inner_extern_class ! (
152
154
#[ derive( PartialEq , Eq , Hash ) ]
153
155
#[ cfg( feature = "Foundation_NSDictionary" ) ]
154
- pub struct NSMutableDictionary <KeyType : Message = AnyObject , ObjectType : Message = AnyObject > {
156
+ pub struct NSMutableDictionary <KeyType : ? Sized = AnyObject , ObjectType : ? Sized = AnyObject > {
155
157
// Inherit auto traits from superclass.
156
158
__superclass: NSDictionary <KeyType , ObjectType >,
157
159
}
158
160
159
161
#[ cfg( feature = "Foundation_NSDictionary" ) ]
160
- unsafe impl <KeyType : Message , ObjectType : Message > ClassType
162
+ unsafe impl <KeyType : ? Sized + Message , ObjectType : ? Sized + Message > ClassType
161
163
for NSMutableDictionary <KeyType , ObjectType >
162
164
{
163
165
#[ inherits( NSObject ) ]
@@ -177,15 +179,15 @@ __inner_extern_class!(
177
179
__inner_extern_class ! (
178
180
#[ derive( PartialEq , Eq , Hash ) ]
179
181
#[ cfg( feature = "Foundation_NSSet" ) ]
180
- pub struct NSSet <ObjectType : Message = AnyObject > {
182
+ pub struct NSSet <ObjectType : ? Sized = AnyObject > {
181
183
// SAFETY: Auto traits specified below.
182
184
__superclass: UnsafeIgnoreAutoTraits <NSObject >,
183
185
// Same as if the set was implemented as `NSArray<ObjectType>`.
184
186
__inner: PhantomData <Id <ObjectType >>,
185
187
}
186
188
187
189
#[ cfg( feature = "Foundation_NSSet" ) ]
188
- unsafe impl <ObjectType : Message > ClassType for NSSet <ObjectType > {
190
+ unsafe impl <ObjectType : ? Sized + Message > ClassType for NSSet <ObjectType > {
189
191
type Super = NSObject ;
190
192
type Mutability = ImmutableWithMutableSubclass <NSMutableSet <ObjectType >>;
191
193
@@ -202,13 +204,13 @@ __inner_extern_class!(
202
204
__inner_extern_class ! (
203
205
#[ derive( PartialEq , Eq , Hash ) ]
204
206
#[ cfg( feature = "Foundation_NSSet" ) ]
205
- pub struct NSMutableSet <ObjectType : Message = AnyObject > {
207
+ pub struct NSMutableSet <ObjectType : ? Sized = AnyObject > {
206
208
// Inherit auto traits from superclass.
207
209
__superclass: NSSet <ObjectType >,
208
210
}
209
211
210
212
#[ cfg( feature = "Foundation_NSSet" ) ]
211
- unsafe impl <ObjectType : Message > ClassType for NSMutableSet <ObjectType > {
213
+ unsafe impl <ObjectType : ? Sized + Message > ClassType for NSMutableSet <ObjectType > {
212
214
#[ inherits( NSObject ) ]
213
215
type Super = NSSet <ObjectType >;
214
216
type Mutability = MutableWithImmutableSuperclass <NSSet <ObjectType >>;
@@ -224,15 +226,15 @@ __inner_extern_class!(
224
226
) ;
225
227
226
228
__inner_extern_class ! (
227
- #[ derive( Debug , PartialEq , Eq , Hash ) ]
229
+ #[ derive( PartialEq , Eq , Hash ) ]
228
230
#[ cfg( feature = "Foundation_NSCountedSet" ) ]
229
- pub struct NSCountedSet <ObjectType : Message = AnyObject > {
231
+ pub struct NSCountedSet <ObjectType : ? Sized = AnyObject > {
230
232
// Inherit auto traits from superclass.
231
233
__superclass: NSMutableSet <ObjectType >,
232
234
}
233
235
234
236
#[ cfg( feature = "Foundation_NSCountedSet" ) ]
235
- unsafe impl <ObjectType : Message > ClassType for NSCountedSet <ObjectType > {
237
+ unsafe impl <ObjectType : ? Sized + Message > ClassType for NSCountedSet <ObjectType > {
236
238
#[ inherits( NSSet <ObjectType >, NSObject ) ]
237
239
type Super = NSMutableSet <ObjectType >;
238
240
type Mutability = Mutable ;
@@ -250,15 +252,15 @@ __inner_extern_class!(
250
252
__inner_extern_class ! (
251
253
#[ derive( PartialEq , Eq , Hash ) ]
252
254
#[ cfg( feature = "Foundation_NSOrderedSet" ) ]
253
- pub struct NSOrderedSet <ObjectType : Message = AnyObject > {
255
+ pub struct NSOrderedSet <ObjectType : ? Sized = AnyObject > {
254
256
// SAFETY: Auto traits specified below.
255
257
__superclass: UnsafeIgnoreAutoTraits <NSObject >,
256
258
// Same as if the set was implemented with `NSArray<ObjectType>`.
257
259
__inner: PhantomData <Id <ObjectType >>,
258
260
}
259
261
260
262
#[ cfg( feature = "Foundation_NSOrderedSet" ) ]
261
- unsafe impl <ObjectType : Message > ClassType for NSOrderedSet <ObjectType > {
263
+ unsafe impl <ObjectType : ? Sized + Message > ClassType for NSOrderedSet <ObjectType > {
262
264
type Super = NSObject ;
263
265
type Mutability = ImmutableWithMutableSubclass <NSMutableOrderedSet <ObjectType >>;
264
266
@@ -275,13 +277,13 @@ __inner_extern_class!(
275
277
__inner_extern_class ! (
276
278
#[ derive( PartialEq , Eq , Hash ) ]
277
279
#[ cfg( feature = "Foundation_NSOrderedSet" ) ]
278
- pub struct NSMutableOrderedSet <ObjectType : Message = AnyObject > {
280
+ pub struct NSMutableOrderedSet <ObjectType : ? Sized = AnyObject > {
279
281
// Inherit auto traits from superclass.
280
282
__superclass: NSOrderedSet <ObjectType >,
281
283
}
282
284
283
285
#[ cfg( feature = "Foundation_NSOrderedSet" ) ]
284
- unsafe impl <ObjectType : Message > ClassType for NSMutableOrderedSet <ObjectType > {
286
+ unsafe impl <ObjectType : ? Sized + Message > ClassType for NSMutableOrderedSet <ObjectType > {
285
287
#[ inherits( NSObject ) ]
286
288
type Super = NSOrderedSet <ObjectType >;
287
289
type Mutability = MutableWithImmutableSuperclass <NSOrderedSet <ObjectType >>;
@@ -299,7 +301,7 @@ __inner_extern_class!(
299
301
__inner_extern_class ! (
300
302
#[ derive( Debug , PartialEq , Eq , Hash ) ]
301
303
#[ cfg( feature = "Foundation_NSEnumerator" ) ]
302
- pub struct NSEnumerator <ObjectType : Message = AnyObject > {
304
+ pub struct NSEnumerator <ObjectType : ? Sized = AnyObject > {
303
305
// SAFETY: Auto traits specified below.
304
306
__superclass: UnsafeIgnoreAutoTraits <NSObject >,
305
307
// Enumerators are basically the same as if we were storing
@@ -315,7 +317,7 @@ __inner_extern_class!(
315
317
}
316
318
317
319
#[ cfg( feature = "Foundation_NSEnumerator" ) ]
318
- unsafe impl <ObjectType : Message > ClassType for NSEnumerator <ObjectType > {
320
+ unsafe impl <ObjectType : ? Sized + Message > ClassType for NSEnumerator <ObjectType > {
319
321
type Super = NSObject ;
320
322
type Mutability = Mutable ;
321
323
0 commit comments