@@ -47,6 +47,8 @@ newtype TType =
4747 TImplTraitType ( ImplTraitTypeRepr impl ) or
4848 TDynTraitType ( Trait t ) { t = any ( DynTraitTypeRepr dt ) .getTrait ( ) } or
4949 TSliceType ( ) or
50+ TNeverType ( ) or
51+ TPtrType ( ) or
5052 TTupleTypeParameter ( int arity , int i ) { exists ( TTuple ( arity ) ) and i in [ 0 .. arity - 1 ] } or
5153 TTypeParamTypeParameter ( TypeParam t ) or
5254 TAssociatedTypeTypeParameter ( TypeAlias t ) { any ( TraitItemNode trait ) .getAnAssocItem ( ) = t } or
@@ -57,7 +59,8 @@ newtype TType =
5759 } or
5860 TRefTypeParameter ( ) or
5961 TSelfTypeParameter ( Trait t ) or
60- TSliceTypeParameter ( )
62+ TSliceTypeParameter ( ) or
63+ TPtrTypeParameter ( )
6164
6265private predicate implTraitTypeParam ( ImplTraitTypeRepr implTrait , int i , TypeParam tp ) {
6366 implTrait .isInReturnPos ( ) and
@@ -374,6 +377,33 @@ class SliceType extends Type, TSliceType {
374377 override Location getLocation ( ) { result instanceof EmptyLocation }
375378}
376379
380+ class NeverType extends Type , TNeverType {
381+ override StructField getStructField ( string name ) { none ( ) }
382+
383+ override TupleField getTupleField ( int i ) { none ( ) }
384+
385+ override TypeParameter getPositionalTypeParameter ( int i ) { none ( ) }
386+
387+ override string toString ( ) { result = "!" }
388+
389+ override Location getLocation ( ) { result instanceof EmptyLocation }
390+ }
391+
392+ class PtrType extends Type , TPtrType {
393+ override StructField getStructField ( string name ) { none ( ) }
394+
395+ override TupleField getTupleField ( int i ) { none ( ) }
396+
397+ override TypeParameter getPositionalTypeParameter ( int i ) {
398+ i = 0 and
399+ result = TPtrTypeParameter ( )
400+ }
401+
402+ override string toString ( ) { result = "*" }
403+
404+ override Location getLocation ( ) { result instanceof EmptyLocation }
405+ }
406+
377407/** A type parameter. */
378408abstract class TypeParameter extends Type {
379409 override StructField getStructField ( string name ) { none ( ) }
@@ -529,6 +559,12 @@ class SliceTypeParameter extends TypeParameter, TSliceTypeParameter {
529559 override Location getLocation ( ) { result instanceof EmptyLocation }
530560}
531561
562+ class PtrTypeParameter extends TypeParameter , TPtrTypeParameter {
563+ override string toString ( ) { result = "*T" }
564+
565+ override Location getLocation ( ) { result instanceof EmptyLocation }
566+ }
567+
532568/**
533569 * The implicit `Self` type parameter of a trait, that refers to the
534570 * implementing type of the trait.
0 commit comments