Skip to content

Commit 588c791

Browse files
committed
Rust: fix missing canonical paths
1 parent 5b7485d commit 588c791

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

rust/ql/lib/codeql/rust/internal/PathResolution.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ class ImplItemNode extends ImplOrTraitItemNode instanceof Impl {
625625
result = "<"
626626
or
627627
i = 1 and
628-
result = this.getSelfCanonicalPath(c)
628+
result = this.getSelfCanonicalPath(_)
629629
or
630630
if exists(this.getTraitPath())
631631
then

rust/ql/test/extractor-tests/canonical_path/canonical_paths.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ canonicalPath
2929
| regular.rs:69:1:71:1 | fn is_number_or_letter | test::regular::is_number_or_letter |
3030
| regular.rs:73:1:75:1 | trait Abs | test::regular::Abs |
3131
| regular.rs:74:5:74:25 | fn abs | <_ as test::regular::Abs>::abs |
32+
| regular.rs:77:1:85:1 | impl Abs for i32 { ... } | <core::i32 as test::regular::Abs> |
33+
| regular.rs:78:5:84:5 | fn abs | <core::i32 as test::regular::Abs>::abs |
3234
canonicalPaths
3335
| anonymous.rs:1:1:1:26 | use ...::Trait | None | None |
3436
| anonymous.rs:3:1:32:1 | fn canonicals | repo::test | crate::anonymous::canonicals |

0 commit comments

Comments
 (0)