@@ -524,7 +524,7 @@ impl DeriveTrait {
524524
525525 fn can_derive_fnptr ( & self , f : & FunctionSig ) -> CanDerive {
526526 match ( self , f. function_pointers_can_derive ( ) ) {
527- ( DeriveTrait :: Copy , _ ) | ( DeriveTrait :: Default , _) | ( _, true ) => {
527+ ( DeriveTrait :: Copy | DeriveTrait :: Default , _) | ( _, true ) => {
528528 trace ! ( " function pointer can derive {self}" ) ;
529529 CanDerive :: Yes
530530 }
@@ -565,14 +565,17 @@ impl DeriveTrait {
565565 fn can_derive_simple ( & self , kind : & TypeKind ) -> CanDerive {
566566 match ( self , kind) {
567567 // === Default ===
568- ( DeriveTrait :: Default , TypeKind :: Void ) |
569- ( DeriveTrait :: Default , TypeKind :: NullPtr ) |
570- ( DeriveTrait :: Default , TypeKind :: Enum ( ..) ) |
571- ( DeriveTrait :: Default , TypeKind :: Reference ( ..) ) |
572- ( DeriveTrait :: Default , TypeKind :: TypeParam ) |
573- ( DeriveTrait :: Default , TypeKind :: ObjCInterface ( ..) ) |
574- ( DeriveTrait :: Default , TypeKind :: ObjCId ) |
575- ( DeriveTrait :: Default , TypeKind :: ObjCSel ) => {
568+ (
569+ DeriveTrait :: Default ,
570+ TypeKind :: Void |
571+ TypeKind :: NullPtr |
572+ TypeKind :: Enum ( ..) |
573+ TypeKind :: Reference ( ..) |
574+ TypeKind :: TypeParam |
575+ TypeKind :: ObjCInterface ( ..) |
576+ TypeKind :: ObjCId |
577+ TypeKind :: ObjCSel ,
578+ ) => {
576579 trace ! ( " types that always cannot derive Default" ) ;
577580 CanDerive :: No
578581 }
@@ -582,8 +585,10 @@ impl DeriveTrait {
582585 )
583586 }
584587 // === Hash ===
585- ( DeriveTrait :: Hash , TypeKind :: Float ( ..) ) |
586- ( DeriveTrait :: Hash , TypeKind :: Complex ( ..) ) => {
588+ (
589+ DeriveTrait :: Hash ,
590+ TypeKind :: Float ( ..) | TypeKind :: Complex ( ..) ,
591+ ) => {
587592 trace ! ( " float cannot derive Hash" ) ;
588593 CanDerive :: No
589594 }
0 commit comments