@@ -325,37 +325,37 @@ impl CanDeriveDefault for Item {
325
325
326
326
impl CanDeriveCopy for Item {
327
327
fn can_derive_copy ( & self , ctx : & BindgenContext ) -> bool {
328
- self . id ( ) . can_derive_copy ( ctx)
328
+ self . id ( ) . can_derive_copy ( ctx) && ! self . is_opaque ( ctx , & ( ) )
329
329
}
330
330
}
331
331
332
332
impl CanDeriveHash for Item {
333
333
fn can_derive_hash ( & self , ctx : & BindgenContext ) -> bool {
334
- self . id ( ) . can_derive_hash ( ctx)
334
+ self . id ( ) . can_derive_hash ( ctx) && ! self . is_opaque ( ctx , & ( ) )
335
335
}
336
336
}
337
337
338
338
impl CanDerivePartialOrd for Item {
339
339
fn can_derive_partialord ( & self , ctx : & BindgenContext ) -> bool {
340
- self . id ( ) . can_derive_partialord ( ctx)
340
+ self . id ( ) . can_derive_partialord ( ctx) && ! self . is_opaque ( ctx , & ( ) )
341
341
}
342
342
}
343
343
344
344
impl CanDerivePartialEq for Item {
345
345
fn can_derive_partialeq ( & self , ctx : & BindgenContext ) -> bool {
346
- self . id ( ) . can_derive_partialeq ( ctx)
346
+ self . id ( ) . can_derive_partialeq ( ctx) && ! self . is_opaque ( ctx , & ( ) )
347
347
}
348
348
}
349
349
350
350
impl CanDeriveEq for Item {
351
351
fn can_derive_eq ( & self , ctx : & BindgenContext ) -> bool {
352
- self . id ( ) . can_derive_eq ( ctx)
352
+ self . id ( ) . can_derive_eq ( ctx) && ! self . is_opaque ( ctx , & ( ) )
353
353
}
354
354
}
355
355
356
356
impl CanDeriveOrd for Item {
357
357
fn can_derive_ord ( & self , ctx : & BindgenContext ) -> bool {
358
- self . id ( ) . can_derive_ord ( ctx)
358
+ self . id ( ) . can_derive_ord ( ctx) && ! self . is_opaque ( ctx , & ( ) )
359
359
}
360
360
}
361
361
0 commit comments