File tree Expand file tree Collapse file tree 2 files changed +4
-17
lines changed
rust/ql/lib/codeql/rust/internal Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ newtype TType =
5959 TSelfTypeParameter ( Trait t ) or
6060 TSliceTypeParameter ( )
6161
62- predicate implTraitTypeParam ( ImplTraitTypeRepr implTrait , int i , TypeParam tp ) {
62+ private predicate implTraitTypeParam ( ImplTraitTypeRepr implTrait , int i , TypeParam tp ) {
6363 implTrait .isInReturnPos ( ) and
6464 tp = implTrait .getFunction ( ) .getGenericParamList ( ) .getTypeParam ( i ) and
6565 // Only include type parameters of the function that occur inside the impl
Original file line number Diff line number Diff line change @@ -75,21 +75,7 @@ class SliceTypeReprMention extends TypeMention instanceof SliceTypeRepr {
7575 }
7676}
7777
78- /** Holds if `path` is used as a type mention during type inference. */
79- predicate relevantPathTypeMention ( Path path ) {
80- path =
81- [
82- any ( PathTypeRepr r ) .getPath ( ) ,
83- any ( StructExpr s ) .getPath ( ) .getQualifier * ( ) ,
84- any ( CallExpr ce ) .getFunction ( ) .( PathExpr ) .getPath ( ) .getQualifier * ( ) ,
85- any ( StructPat p ) .getPath ( ) ,
86- any ( TupleStructPat p ) .getPath ( )
87- ]
88- }
89-
90- abstract class PathTypeMention extends TypeMention , Path {
91- PathTypeMention ( ) { relevantPathTypeMention ( this ) }
92- }
78+ abstract class PathTypeMention extends TypeMention , Path { }
9379
9480class AliasPathTypeMention extends PathTypeMention {
9581 TypeAlias resolved ;
@@ -241,7 +227,8 @@ class NonAliasPathTypeMention extends PathTypeMention {
241227 )
242228 }
243229
244- Type resolveRootType ( ) {
230+ pragma [ nomagic]
231+ private Type resolveRootType ( ) {
245232 result = TStruct ( resolved )
246233 or
247234 result = TEnum ( resolved )
You can’t perform that action at this time.
0 commit comments