Structs

Search 🔒
This implements the traversal over the structure of a given type to try to find instances of ADTs (specifically structs or enums) that do not implement the structural-match traits (StructuralPartialEq and StructuralEq).

Functions

This method traverses the structure of ty, trying to find any types that are not allowed to be used in a const generic.
This method traverses the structure of ty, trying to find an instance of an ADT (i.e. struct or enum) that doesn’t implement the structural-match traits, or a generic type parameter (which cannot be determined to be structural-match).
This method returns true if and only if adt_ty itself has been marked as eligible for structural-match: namely, if it implements both StructuralPartialEq and StructuralEq (which are respectively injected by #[derive(PartialEq)] and #[derive(Eq)]).