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 =
59
59
TSelfTypeParameter ( Trait t ) or
60
60
TSliceTypeParameter ( )
61
61
62
- predicate implTraitTypeParam ( ImplTraitTypeRepr implTrait , int i , TypeParam tp ) {
62
+ private predicate implTraitTypeParam ( ImplTraitTypeRepr implTrait , int i , TypeParam tp ) {
63
63
implTrait .isInReturnPos ( ) and
64
64
tp = implTrait .getFunction ( ) .getGenericParamList ( ) .getTypeParam ( i ) and
65
65
// 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 {
75
75
}
76
76
}
77
77
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 { }
93
79
94
80
class AliasPathTypeMention extends PathTypeMention {
95
81
TypeAlias resolved ;
@@ -241,7 +227,8 @@ class NonAliasPathTypeMention extends PathTypeMention {
241
227
)
242
228
}
243
229
244
- Type resolveRootType ( ) {
230
+ pragma [ nomagic]
231
+ private Type resolveRootType ( ) {
245
232
result = TStruct ( resolved )
246
233
or
247
234
result = TEnum ( resolved )
You can’t perform that action at this time.
0 commit comments