@@ -325,37 +325,37 @@ impl CanDeriveDefault for Item {
325325
326326impl CanDeriveCopy for Item {
327327 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 , & ( ) )
329329 }
330330}
331331
332332impl CanDeriveHash for Item {
333333 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 , & ( ) )
335335 }
336336}
337337
338338impl CanDerivePartialOrd for Item {
339339 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 , & ( ) )
341341 }
342342}
343343
344344impl CanDerivePartialEq for Item {
345345 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 , & ( ) )
347347 }
348348}
349349
350350impl CanDeriveEq for Item {
351351 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 , & ( ) )
353353 }
354354}
355355
356356impl CanDeriveOrd for Item {
357357 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 , & ( ) )
359359 }
360360}
361361
0 commit comments