Skip to content

Commit 8243f87

Browse files
committed
Rust: Modify the exclusion as suggested in comments.
1 parent 3a54c10 commit 8243f87

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rust/ql/lib/codeql/files/FileSystem.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ private import codeql.util.FileSystem
55
private import codeql.rust.elements.SourceFile
66
private import codeql.rust.elements.AstNode
77
private import codeql.rust.elements.Comment
8-
private import codeql.rust.elements.internal.generated.ParentChild
98

109
private module Input implements InputSig {
1110
abstract class ContainerBase extends @container {
@@ -48,7 +47,7 @@ class File extends Container, Impl::File {
4847
exists(AstNode node, Location loc |
4948
not node instanceof Comment and
5049
not node instanceof SourceFile and
51-
not getImmediateParent(node) instanceof SourceFile and // ignore top-level elements for now as we're getting their locations wrong when a comment is attached
50+
not node instanceof Item and // ignore Items for now as we're getting their locations wrong when a comment is attached
5251
loc = node.getLocation()
5352
|
5453
node.getFile() = this and

0 commit comments

Comments
 (0)