Skip to content

Commit f6ad152

Browse files
committed
take2
1 parent b6b6e5a commit f6ad152

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ abstract class ItemNode extends Locatable {
208208
crateDefEdge(this, name, result, kind)
209209
or
210210
crateDependencyEdge(this, name, result) and
211-
not declaresDirectly(this, TTypeNamespace(), name) and
212211
kind.isInternal()
213212
or
214213
externCrateEdge(this, name, result) and
@@ -1242,8 +1241,8 @@ private predicate crateDependencyEdge(SourceFileItemNode file, string name, Crat
12421241
or
12431242
// All files _should_ belong to a crate, but for those where we cannot identify the crate,
12441243
// we give access to all crates as a fallback.
1245-
not file = any(Crate c).getASourceFile() and
1246-
name = dep.getName()
1244+
name = dep.getName() and
1245+
not declaresDirectly(file, TTypeNamespace(), name)
12471246
}
12481247

12491248
private predicate useTreeDeclares(UseTree tree, string name) {

0 commit comments

Comments
 (0)