We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84517f0 commit df076e5Copy full SHA for df076e5
rust/ql/lib/codeql/rust/internal/PathResolution.qll
@@ -334,7 +334,14 @@ class CrateItemNode extends ItemNode instanceof Crate {
334
335
override TypeParam getTypeParam(int i) { none() }
336
337
- override string getCanonicalPath(Crate c) { c = this and result = Crate.super.getName() }
+ override string getCanonicalPath(Crate c) {
338
+ c = this and
339
+ result = Crate.super.getName() and
340
+ not exists(FunctionItemNode main |
341
+ main.getImmediateParent() = this.getModuleNode() and
342
+ main.getName() = "main"
343
+ )
344
+ }
345
346
override string getCanonicalPathPrefixFor(Crate c, ItemNode child) {
347
exists(ModuleLikeNode m |
0 commit comments