about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-01-16 22:53:02 +0000
committerMichael Goulet <michael@errs.io>2023-01-16 23:03:05 +0000
commite8ebd43eeb4ff25bec7859589eba36afa26c1ed0 (patch)
tree0d7101f9b570a7c216c4aa29bb3d076a03111baf
parent481725984b4cd94ef5c00917b01c1771b6e5299c (diff)
downloadrust-e8ebd43eeb4ff25bec7859589eba36afa26c1ed0.tar.gz
rust-e8ebd43eeb4ff25bec7859589eba36afa26c1ed0.zip
Use scope_expr_id from ProbeCtxt
-rw-r--r--compiler/rustc_hir_typeck/src/method/probe.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_hir_typeck/src/method/probe.rs b/compiler/rustc_hir_typeck/src/method/probe.rs
index 948a14604d4..a2481431363 100644
--- a/compiler/rustc_hir_typeck/src/method/probe.rs
+++ b/compiler/rustc_hir_typeck/src/method/probe.rs
@@ -486,7 +486,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             probe_cx.assemble_inherent_candidates();
             match scope {
                 ProbeScope::TraitsInScope => {
-                    probe_cx.assemble_extension_candidates_for_traits_in_scope(scope_expr_id)
+                    probe_cx.assemble_extension_candidates_for_traits_in_scope()
                 }
                 ProbeScope::AllTraits => probe_cx.assemble_extension_candidates_for_all_traits(),
             };
@@ -889,9 +889,9 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
         }
     }
 
-    fn assemble_extension_candidates_for_traits_in_scope(&mut self, expr_hir_id: hir::HirId) {
+    fn assemble_extension_candidates_for_traits_in_scope(&mut self) {
         let mut duplicates = FxHashSet::default();
-        let opt_applicable_traits = self.tcx.in_scope_traits(expr_hir_id);
+        let opt_applicable_traits = self.tcx.in_scope_traits(self.scope_expr_id);
         if let Some(applicable_traits) = opt_applicable_traits {
             for trait_candidate in applicable_traits.iter() {
                 let trait_did = trait_candidate.def_id;