Rust: Fixes based on PR review

This commit is contained in:
Simon Friis Vindum
2025-05-28 16:01:28 +02:00
parent 5160bc2b9a
commit 6500ebf631
2 changed files with 3 additions and 1 deletions

View File

@@ -99,7 +99,7 @@ module Impl {
*
* This is either 1 for prefix operations, or 2 for binary operations.
*/
final int getNumberOfOperands() { result = count(this.getAnOperand()) }
final int getNumberOfOperands() { result = strictcount(this.getAnOperand()) }
/** Gets an operand of this operation. */
Expr getAnOperand() { result = this.getOperand(_) }

View File

@@ -691,6 +691,8 @@ private module CallExprBaseMatchingInput implements MatchingInputSig {
}
private class OperationAccess extends Access instanceof Operation {
OperationAccess() { super.isOverloaded(_, _) }
override Type getTypeArgument(TypeArgumentPosition apos, TypePath path) {
// The syntax for operators does not allow type arguments.
none()