@@ -569,74 +569,6 @@ class ImplTraitTypeTypeParameter extends ImplTraitType, TypeParameter {
569569 override TypeParameter getPositionalTypeParameter ( int i ) { none ( ) }
570570}
571571
572- /**
573- * A type abstraction. I.e., a place in the program where type variables are
574- * introduced.
575- *
576- * Example:
577- * ```rust
578- * impl<A, B> Foo<A, B> { }
579- * // ^^^^^^ a type abstraction
580- * ```
581- */
582- abstract class TypeAbstraction extends AstNode {
583- abstract TypeParameter getATypeParameter ( ) ;
584- }
585-
586- final class ImplTypeAbstraction extends TypeAbstraction , Impl {
587- override TypeParamTypeParameter getATypeParameter ( ) {
588- result .getTypeParam ( ) = this .getGenericParamList ( ) .getATypeParam ( )
589- }
590- }
591-
592- private predicate idDynTraitTypeRepr ( @dyn_trait_type_repr x , @dyn_trait_type_repr y ) { x = y }
593-
594- private predicate idOfDynTraitTypeRepr ( @dyn_trait_type_repr x , int y ) =
595- equivalenceRelation( idDynTraitTypeRepr / 2 ) ( x , y )
596-
597- private int idOfDynTraitTypeRepr ( DynTraitTypeRepr node ) {
598- idOfDynTraitTypeRepr ( Synth:: convertAstNodeToRaw ( node ) , result )
599- }
600-
601- /** Holds if `dt` is the canonical dyn trait type abstraction for `trait`. */
602- private predicate canonicalDynTraitTypeAbstraction ( DynTraitTypeRepr dt , Trait trait ) {
603- dt = min ( DynTraitTypeRepr d | d .getTrait ( ) = trait | d order by idOfDynTraitTypeRepr ( d ) )
604- }
605-
606- final class DynTypeAbstraction extends TypeAbstraction , DynTraitTypeRepr {
607- DynTypeAbstraction ( ) { canonicalDynTraitTypeAbstraction ( this , this .getTrait ( ) ) }
608-
609- override TypeParameter getATypeParameter ( ) {
610- result = any ( DynTraitTypeParameter tp | tp .getTrait ( ) = this .getTrait ( ) ) .getTraitTypeParameter ( )
611- }
612- }
613-
614- final class TraitTypeAbstraction extends TypeAbstraction , Trait {
615- override TypeParameter getATypeParameter ( ) {
616- result .( TypeParamTypeParameter ) .getTypeParam ( ) = this .getGenericParamList ( ) .getATypeParam ( )
617- or
618- result .( AssociatedTypeTypeParameter ) .getTrait ( ) = this
619- or
620- result .( SelfTypeParameter ) .getTrait ( ) = this
621- }
622- }
623-
624- final class TypeBoundTypeAbstraction extends TypeAbstraction , TypeBound {
625- override TypeParameter getATypeParameter ( ) { none ( ) }
626- }
627-
628- final class SelfTypeBoundTypeAbstraction extends TypeAbstraction , Name {
629- SelfTypeBoundTypeAbstraction ( ) { any ( TraitTypeAbstraction trait ) .getName ( ) = this }
630-
631- override TypeParameter getATypeParameter ( ) { none ( ) }
632- }
633-
634- final class ImplTraitTypeReprAbstraction extends TypeAbstraction , ImplTraitTypeRepr {
635- override TypeParameter getATypeParameter ( ) {
636- implTraitTypeParam ( this , _, result .( TypeParamTypeParameter ) .getTypeParam ( ) )
637- }
638- }
639-
640572/**
641573 * Holds if `t` is a valid complex [`self` root type][1].
642574 *
0 commit comments