Skip to content

Commit f0f1ff5

Browse files
committed
fixup! Rust: Tweak existing isStruct predicates
1 parent a92c552 commit f0f1ff5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/ql/lib/codeql/rust/elements/internal/StructImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module Impl {
4848

4949
/** Holds if this struct uses struct fields. */
5050
pragma[nomagic]
51-
predicate isStruct() { not this.isTuple() }
51+
predicate isStruct() { this.getFieldList() instanceof StructFieldList }
5252

5353
/** Holds if this struct does not have a field list. */
5454
predicate isUnit() { not this.hasFieldList() }

0 commit comments

Comments
 (0)