From 12a6dcc4ff0cb06fbabc917982a9f9b9174de440 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Thu, 4 Dec 2025 12:55:43 +0100 Subject: [PATCH] Rust: Remove some predicates --- .../ql/lib/codeql/rust/elements/internal/CallExprImpl.qll | 6 ------ rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll | 8 +------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll index 2867746dc42..cad921640ef 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll @@ -44,12 +44,6 @@ module Impl { override string toStringImpl() { result = this.getFunction().toAbbreviatedString() + "(...)" } 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() } } /** diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll index ae01736f9fa..4891cd50fd3 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll @@ -39,9 +39,6 @@ module Impl { /** Gets an argument of this call. */ 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. * @@ -71,9 +68,6 @@ module Impl { /** Gets the name of the function called, if any. */ 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. */ pragma[nomagic] Function getARuntimeTarget() { @@ -110,6 +104,6 @@ module Impl { * x[y]; // `x` is receiver * ``` */ - override Expr getReceiver() { none() } + Expr getReceiver() { none() } } }