File tree 1 file changed +9
-2
lines changed
rust/ql/lib/codeql/rust/internal
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -69,11 +69,18 @@ private module Input1 implements InputSig1<Location> {
69
69
apos .asMethodTypeArgumentPosition ( ) = ppos .asTypeParam ( ) .getPosition ( )
70
70
}
71
71
72
+ private import codeql.rust.elements.internal.generated.Synth
73
+
74
+ private class TTypeParameterAstNode = Synth:: TTypeParam or Synth:: TTrait ;
75
+
76
+ /** An `AstNode` that might correspond to a `TypeParameter`. */
77
+ private class TypeParameterAstNode extends AstNode , TTypeParameterAstNode { }
78
+
72
79
private predicate id ( Raw:: AstNode x , Raw:: AstNode y ) { x = y }
73
80
74
81
private predicate idOfRaw ( Raw:: AstNode x , int y ) = equivalenceRelation( id / 2 ) ( x , y )
75
82
76
- private int idOf ( AstNode node ) { idOfRaw ( Synth:: convertAstNodeToRaw ( node ) , result ) }
83
+ private int idOf ( TypeParameterAstNode node ) { idOfRaw ( Synth:: convertAstNodeToRaw ( node ) , result ) }
77
84
78
85
int getTypeParameterId ( TypeParameter tp ) {
79
86
tp =
@@ -83,7 +90,7 @@ private module Input1 implements InputSig1<Location> {
83
90
id = 0
84
91
or
85
92
kind = 1 and
86
- exists ( AstNode node | id = idOf ( node ) |
93
+ exists ( TypeParameterAstNode node | id = idOf ( node ) |
87
94
node = tp0 .( TypeParamTypeParameter ) .getTypeParam ( ) or
88
95
node = tp0 .( SelfTypeParameter ) .getTrait ( )
89
96
)
You can’t perform that action at this time.
0 commit comments