Skip to content

Commit 2d16b52

Browse files
committed
Rust: Fix bad join
``` Evaluated relational algebra for predicate DataFlowImpl::RustDataFlow::pathResolveToVariantCanonicalPath/2#dc73aca0@34414869 with tuple counts: 422639 ~3% {3} r1 = JOIN `DataFlowImpl::resolveExtendedCanonicalPath/3#0454a346` WITH Synth::Synth::TPathAstNode#a7913307 ON FIRST 1 OUTPUT Lhs.1, Lhs.0, Lhs.2 73033499 ~7% {6} | JOIN WITH DataFlowImpl::MkVariantCanonicalPath#ab1ecb00 ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Rhs.3, _, Rhs.1, Rhs.2 {4} | REWRITE WITH Tmp.3 := "::", Out.3 := (In.4 ++ Tmp.3 ++ In.5), TEST Out.3 = InOut.1 KEEPING 4 170993 ~1% {2} | SCAN OUTPUT In.0, In.2 return r1 ```
1 parent 3171752 commit 2d16b52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -957,8 +957,8 @@ module RustDataFlow implements InputSig<Location> {
957957
/** Holds if path `p` resolves to variant `v`. */
958958
private predicate pathResolveToVariantCanonicalPath(PathAstNode p, VariantCanonicalPath v) {
959959
exists(CrateOriginOption crate, string path, string name |
960-
resolveExtendedCanonicalPath(p, crate, path + "::" + name) and
961-
v = MkVariantCanonicalPath(crate, path, name)
960+
resolveExtendedCanonicalPath(p, pragma[only_bind_into](crate), path + "::" + name) and
961+
v = MkVariantCanonicalPath(pragma[only_bind_into](crate), path, name)
962962
)
963963
}
964964

0 commit comments

Comments
 (0)