diff options
author | Philip Herron <herron.philip@googlemail.com> | 2023-04-04 15:24:01 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-04-05 09:24:55 +0000 |
commit | b9fc7b51a46192a30f445bbca7b1dd857fa0c856 (patch) | |
tree | 82ced5cb14c23682a2dbc59b9b8c2aa5ea444bf1 /gcc | |
parent | da41f6d8a4f86554e3909c37fae91d28b9d9ac21 (diff) | |
download | gcc-b9fc7b51a46192a30f445bbca7b1dd857fa0c856.zip gcc-b9fc7b51a46192a30f445bbca7b1dd857fa0c856.tar.gz gcc-b9fc7b51a46192a30f445bbca7b1dd857fa0c856.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')
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.cc | 4 |
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 904c47b..90f1b14 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 |