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 {
3434 exists ( this .getField ( pragma [ only_bind_into ] ( pos ) ) )
3535 }
3636
37+ /**
38+ * Gets the struct matched by this pattern.
39+ */
40+ Struct getStruct ( ) { result = PathResolution:: resolvePath ( this .getPath ( ) ) }
41+
3742 /** Gets the tuple field that matches the `pos`th pattern of this pattern. */
3843 pragma [ nomagic]
3944 TupleField getTupleField ( int pos ) {
Original file line number Diff line number Diff line change 44
55private import rust
66private import codeql.rust.Concepts
7- private import codeql.rust.dataflow.DataFlow
87
98/**
109 * Parameters of a handler function
1110 */
1211private class PoemHandlerParam extends RemoteSource:: Range {
1312 PoemHandlerParam ( ) {
1413 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" ]
1816 )
1917 }
2018}
You can’t perform that action at this time.
0 commit comments