public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-7514] gccrs: minor refactor to reuse a variable instead of recreating it later
@ 2024-01-16 17:40 Arthur Cohen
0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-16 17:40 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:8e8c56392edb2cdf7d61672dda609bbb6b5941e2
commit r14-7514-g8e8c56392edb2cdf7d61672dda609bbb6b5941e2
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 ce215e35322..4e4fdbaec1e 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:[~2024-01-16 17:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 17:40 [gcc r14-7514] gccrs: minor refactor to reuse a variable instead of recreating it later Arthur Cohen
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).