Skip to content

Commit 6500ebf

Browse files
committed
Rust: Fixes based on PR review
1 parent 5160bc2 commit 6500ebf

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ module Impl {
9999
*
100100
* This is either 1 for prefix operations, or 2 for binary operations.
101101
*/
102-
final int getNumberOfOperands() { result = count(this.getAnOperand()) }
102+
final int getNumberOfOperands() { result = strictcount(this.getAnOperand()) }
103103

104104
/** Gets an operand of this operation. */
105105
Expr getAnOperand() { result = this.getOperand(_) }

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,8 @@ private module CallExprBaseMatchingInput implements MatchingInputSig {
691691
}
692692

693693
private class OperationAccess extends Access instanceof Operation {
694+
OperationAccess() { super.isOverloaded(_, _) }
695+
694696
override Type getTypeArgument(TypeArgumentPosition apos, TypePath path) {
695697
// The syntax for operators does not allow type arguments.
696698
none()

0 commit comments

Comments
 (0)