Skip to content

Commit 2808183

Browse files
authored
Rollup merge of #106963 - compiler-errors:scope-expr-dupe, r=michaelwoerister
Use `scope_expr_id` from `ProbeCtxt` We already store it in the `ProbeCtxt`, so just retrieve it from there.
2 parents 0ed2549 + e8ebd43 commit 2808183

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_hir_typeck/src/method

1 file changed

+3
-3
lines changed

compiler/rustc_hir_typeck/src/method/probe.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
486486
probe_cx.assemble_inherent_candidates();
487487
match scope {
488488
ProbeScope::TraitsInScope => {
489-
probe_cx.assemble_extension_candidates_for_traits_in_scope(scope_expr_id)
489+
probe_cx.assemble_extension_candidates_for_traits_in_scope()
490490
}
491491
ProbeScope::AllTraits => probe_cx.assemble_extension_candidates_for_all_traits(),
492492
};
@@ -889,9 +889,9 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
889889
}
890890
}
891891

892-
fn assemble_extension_candidates_for_traits_in_scope(&mut self, expr_hir_id: hir::HirId) {
892+
fn assemble_extension_candidates_for_traits_in_scope(&mut self) {
893893
let mut duplicates = FxHashSet::default();
894-
let opt_applicable_traits = self.tcx.in_scope_traits(expr_hir_id);
894+
let opt_applicable_traits = self.tcx.in_scope_traits(self.scope_expr_id);
895895
if let Some(applicable_traits) = opt_applicable_traits {
896896
for trait_candidate in applicable_traits.iter() {
897897
let trait_did = trait_candidate.def_id;

0 commit comments

Comments
 (0)