Merge pull request #20963 from hvitved/rust/call-refactor-follow-up

Rust: Remove some predicates
This commit is contained in:
Tom Hvitved
2025-12-05 14:38:47 +01:00
committed by GitHub
2 changed files with 1 additions and 13 deletions

View File

@@ -44,12 +44,6 @@ module Impl {
override string toStringImpl() { result = this.getFunction().toAbbreviatedString() + "(...)" } override string toStringImpl() { result = this.getFunction().toAbbreviatedString() + "(...)" }
override Expr getSyntacticPositionalArgument(int i) { result = getSyntacticArg(this, i) } override Expr getSyntacticPositionalArgument(int i) { result = getSyntacticArg(this, i) }
// todo: remove once internal query has been updated
Expr getArg(int i) { result = getSyntacticArg(this, i) }
// todo: remove once internal query has been updated
int getNumberOfArgs() { result = this.getNumberOfSyntacticArguments() }
} }
/** /**

View File

@@ -39,9 +39,6 @@ module Impl {
/** Gets an argument of this call. */ /** Gets an argument of this call. */
Expr getAnArgument() { result = this.getArgument(_) } Expr getAnArgument() { result = this.getArgument(_) }
// todo: remove once internal query has been updated
Expr getReceiver() { none() }
/** /**
* Gets the `i`th positional argument of this call. * Gets the `i`th positional argument of this call.
* *
@@ -71,9 +68,6 @@ module Impl {
/** Gets the name of the function called, if any. */ /** Gets the name of the function called, if any. */
string getTargetName() { result = this.getStaticTarget().getName().getText() } string getTargetName() { result = this.getStaticTarget().getName().getText() }
// todo: remove once internal query has been updated
string getMethodName() { result = this.getTargetName() }
/** Gets a runtime target of this call, if any. */ /** Gets a runtime target of this call, if any. */
pragma[nomagic] pragma[nomagic]
Function getARuntimeTarget() { Function getARuntimeTarget() {
@@ -110,6 +104,6 @@ module Impl {
* x[y]; // `x` is receiver * x[y]; // `x` is receiver
* ``` * ```
*/ */
override Expr getReceiver() { none() } Expr getReceiver() { none() }
} }
} }