public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] gccrs: minor refactor to reuse a variable instead of recreating it later
@ 2023-05-02  7:10 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-05-02  7:10 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b0f0ed0097416c249c453e0208179f3c438ab685

commit b0f0ed0097416c249c453e0208179f3c438ab685
Author: Philip Herron <herron.philip@googlemail.com>
Date:   Mon Apr 17 21:01:25 2023 +0100

    gccrs: minor refactor to reuse a variable instead of recreating it later
    
    gcc/rust/ChangeLog:
    
            * typecheck/rust-hir-type-check-expr.cc: refactor
    
    Signed-off-by: Philip Herron <herron.philip@googlemail.com>

Diff:
---
 gcc/rust/typecheck/rust-hir-type-check-expr.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/rust/typecheck/rust-hir-type-check-expr.cc b/gcc/rust/typecheck/rust-hir-type-check-expr.cc
index f205a49e707..29afad69b0c 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-expr.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-expr.cc
@@ -1595,8 +1595,7 @@ TypeCheckExpr::resolve_operator_overload (
     return false;
 
   auto segment = HIR::PathIdentSegment (associated_item_name);
-  auto candidates
-    = MethodResolver::Probe (lhs, HIR::PathIdentSegment (associated_item_name));
+  auto candidates = MethodResolver::Probe (lhs, segment);
 
   bool have_implementation_for_lang_item = candidates.size () > 0;
   if (!have_implementation_for_lang_item)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-02  7:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02  7:10 [gcc/devel/rust/master] gccrs: minor refactor to reuse a variable instead of recreating it later Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).