aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.cc
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2023-04-04 15:24:01 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 18:28:45 +0100
commit0997c419a4885c2898259b5dc060037b9afae8d0 (patch)
treeb4670641a12457c82529da0b248a48db0e551dbf /gcc/rust/backend/rust-compile-expr.cc
parent874ebe303531a2261d08c1e8826ab82426f2f64f (diff)
downloadgcc-0997c419a4885c2898259b5dc060037b9afae8d0.zip
gcc-0997c419a4885c2898259b5dc060037b9afae8d0.tar.gz
gcc-0997c419a4885c2898259b5dc060037b9afae8d0.tar.bz2
gccrs: cleanup resolve method address
Calling PathProbeImplTrait resolves directly to the trait bound in question to stop resolving to potentially multiple implementations of that bound gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::resolve_method_address): call path probe impl trait Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.cc')
-rw-r--r--gcc/rust/backend/rust-compile-expr.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc
index e3b012c..668f704 100644
--- a/gcc/rust/backend/rust-compile-expr.cc
+++ b/gcc/rust/backend/rust-compile-expr.cc
@@ -1919,9 +1919,7 @@ CompileExpr::resolve_method_address (TyTy::FnType *fntype, HirId ref,
auto root = receiver->get_root ();
auto candidates
- = Resolver::PathProbeType::Probe (root, segment, true /* probe_impls */,
- false /* probe_bounds */,
- true /* ignore_mandatory_trait_items */);
+ = Resolver::PathProbeImplTrait::Probe (root, segment, trait_ref);
if (candidates.size () == 0)
{
// this means we are defaulting back to the trait_item if