pub fn cmp_id(
        hash_a: &FileHash,
        type_a: &Type,
        hash_b: &FileHash,
        type_b: &Type,
    ) -> cmp::Ordering {
        use self::TypeKind::*;
        match (&type_a.kind, &type_b.kind) {
            (&Base(ref a), &Base(ref b)) => BaseType::cmp_id(a, b),
            (&Def(ref a), &Def(ref b)) => TypeDef::cmp_id(a, b),
            (&Struct(ref a), &Struct(ref b)) => StructType::cmp_id(a, b),
            (&Union(ref a), &Union(ref b)) => UnionType::cmp_id(a, b),
            (&Enumeration(ref a), &Enumeration(ref b)) => EnumerationType::cmp_id(a, b),
            (&Array(ref a), &Array(ref b)) => ArrayType::cmp_id(hash_a, a, hash_b, b),
            (&Function(ref a), &Function(ref b)) => FunctionType::cmp_id(hash_a, a, hash_b, b),
            (&Unspecified(ref a), &Unspecified(ref b)) => UnspecifiedType::cmp_id(a, b),
            (&PointerToMember(ref a), &PointerToMember(ref b)) => {
                PointerToMemberType::cmp_id(hash_a, a, hash_b, b)
            }
            (&Modifier(ref a), &Modifier(ref b)) => TypeModifier::cmp_id(hash_a, a, hash_b, b),
            (&Subrange(ref a), &Subrange(ref b)) => SubrangeType::cmp_id(hash_a, a, hash_b, b),
            _ => {
                let discr_a = type_a.kind.discriminant_value();
                let discr_b = type_b.kind.discriminant_value();
                debug_assert_ne!(discr_a, discr_b);
                discr_a.cmp(&discr_b)
            }
        }
    }
/// Compare the identifying information of two types.
///
/// Equal types must have the same type kind. Further requirements for equality
/// depend on the specific type kind.
///
/// This can be used to sort, and to determine if two types refer to the same definition
/// (even if there are differences in the definitions).
Compare the identifying information of two types.
Equal types must have the same type kind. Further requirements for equality
depend on the specific type kind.

This can be used to sort, and to determine if two types refer to the same definition
(even if there are differences in the definitions).
Compare the identifying information of two types . Equal types must have the same type kind . Further requirements for equality depend on the specific type kind . This can be used to sort and to determine if two types refer to the same definition ( even if there are differences in the definitions ) .
pub fn cmp_id(
        hash_a: &FileHash,
        type_a: &Type,
        hash_b: &FileHash,
        type_b: &Type,
    ) -> cmp::Ordering {
        use self::TypeKind::*;
        match (&type_a.kind, &type_b.kind) {
            (&Base(ref a), &Base(ref b)) => BaseType::cmp_id(a, b),
            (&Def(ref a), &Def(ref b)) => TypeDef::cmp_id(a, b),
            (&Struct(ref a), &Struct(ref b)) => StructType::cmp_id(a, b),
            (&Union(ref a), &Union(ref b)) => UnionType::cmp_id(a, b),
            (&Enumeration(ref a), &Enumeration(ref b)) => EnumerationType::cmp_id(a, b),
            (&Array(ref a), &Array(ref b)) => ArrayType::cmp_id(hash_a, a, hash_b, b),
            (&Function(ref a), &Function(ref b)) => FunctionType::cmp_id(hash_a, a, hash_b, b),
            (&Unspecified(ref a), &Unspecified(ref b)) => UnspecifiedType::cmp_id(a, b),
            (&PointerToMember(ref a), &PointerToMember(ref b)) => {
                PointerToMemberType::cmp_id(hash_a, a, hash_b, b)
            }
            (&Modifier(ref a), &Modifier(ref b)) => TypeModifier::cmp_id(hash_a, a, hash_b, b),
            (&Subrange(ref a), &Subrange(ref b)) => SubrangeType::cmp_id(hash_a, a, hash_b, b),
            _ => {
                let discr_a = type_a.kind.discriminant_value();
                let discr_b = type_b.kind.discriminant_value();
                debug_assert_ne!(discr_a, discr_b);
                discr_a.cmp(&discr_b)
            }
        }
    }
pub fn cmp_id ( hash_a : & FileHash , type_a : & Type , hash_b : & FileHash , type_b : & Type , ) -> cmp :: Ordering { use self :: TypeKind :: * ; match ( & type_a . kind , & type_b . kind ) { ( & Base ( ref a ) , & Base ( ref b ) ) => BaseType :: cmp_id ( a , b ) , ( & Def ( ref a ) , & Def ( ref b ) ) => TypeDef :: cmp_id ( a , b ) , ( & Struct ( ref a ) , & Struct ( ref b ) ) => StructType :: cmp_id ( a , b ) , ( & Union ( ref a ) , & Union ( ref b ) ) => UnionType :: cmp_id ( a , b ) , ( & Enumeration ( ref a ) , & Enumeration ( ref b ) ) => EnumerationType :: cmp_id ( a , b ) , ( & Array ( ref a ) , & Array ( ref b ) ) => ArrayType :: cmp_id ( hash_a , a , hash_b , b ) , ( & Function ( ref a ) , & Function ( ref b ) ) => FunctionType :: cmp_id ( hash_a , a , hash_b , b ) , ( & Unspecified ( ref a ) , & Unspecified ( ref b ) ) => UnspecifiedType :: cmp_id ( a , b ) , ( & PointerToMember ( ref a ) , & PointerToMember ( ref b ) ) => { PointerToMemberType :: cmp_id ( hash_a , a , hash_b , b ) } ( & Modifier ( ref a ) , & Modifier ( ref b ) ) => TypeModifier :: cmp_id ( hash_a , a , hash_b , b ) , ( & Subrange ( ref a ) , & Subrange ( ref b ) ) => SubrangeType :: cmp_id ( hash_a , a , hash_b , b ) , _ => { let discr_a = type_a . kind . discriminant_value ( ) ; let discr_b = type_b . kind . discriminant_value ( ) ; debug_assert_ne ! ( discr_a discr_b ) ; discr_a . cmp ( & discr_b ) } } }
Compare the identifying information of two types.
Compare the identifying information of two types .
hash_a
&FileHash
type_a
&Type
hash_b
&FileHash
type_b
&Type
hash_a
&FileHash
type_a
&Type
hash_b
&FileHash
type_b
&Type