Skip to content

Commit a08b4b7

Browse files
committed
Rust: allow VariableAccess elements to have another primary QL class
1 parent a6e69eb commit a08b4b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rust/ql/lib/codeql/rust/AstConsistency.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ query predicate multipleToStrings(Element e, string s) {
2020
*/
2121
query predicate multipleLocations(Locatable e) { strictcount(e.getLocation()) > 1 }
2222

23-
private predicate multiplePrimaryQlClasses(Element e) { strictcount(e.getAPrimaryQlClass()) > 1 }
23+
private predicate multiplePrimaryQlClasses(Element e) {
24+
strictcount(string cls | cls = e.getAPrimaryQlClass() and cls != "VariableAccess") > 1
25+
}
2426

2527
/**
2628
* Holds if `e` has more than one `getPrimaryQlClasses()` result.

0 commit comments

Comments
 (0)