File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ module Impl {
34
34
exists ( this .getField ( pragma [ only_bind_into ] ( pos ) ) )
35
35
}
36
36
37
+ /**
38
+ * Gets the struct matched by this pattern.
39
+ */
40
+ Struct getStruct ( ) { result = PathResolution:: resolvePath ( this .getPath ( ) ) }
41
+
37
42
/** Gets the tuple field that matches the `pos`th pattern of this pattern. */
38
43
pragma [ nomagic]
39
44
TupleField getTupleField ( int pos ) {
Original file line number Diff line number Diff line change 4
4
5
5
private import rust
6
6
private import codeql.rust.Concepts
7
- private import codeql.rust.dataflow.DataFlow
8
7
9
8
/**
10
9
* Parameters of a handler function
11
10
*/
12
11
private class PoemHandlerParam extends RemoteSource:: Range {
13
12
PoemHandlerParam ( ) {
14
13
exists ( TupleStructPat param |
15
- param .getResolvedPath ( ) = [ "crate::web::query::Query" , "crate::web::path::Path" ]
16
- |
17
- this .asPat ( ) .getPat ( ) = param .getAField ( )
14
+ this .asPat ( ) .getPat ( ) = param .getAField ( ) and
15
+ param .getStruct ( ) .getCanonicalPath ( ) = [ "poem::web::query::Query" , "poem::web::path::Path" ]
18
16
)
19
17
}
20
18
}
You can’t perform that action at this time.
0 commit comments