Remove useless calls to assemble_extension_candidates_for_traits_in_scope
Calls to `assemble_extension_candidates_for_traits_in_scope` with `DUMMY_HIR_ID` as `expr_hir_id` are useless because the first thing that this function does is to return `Ok(())` in this case.
This commit is contained in:
parent
a00bd29e01
commit
795fa0a006
@ -1513,7 +1513,6 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
|
||||
);
|
||||
pcx.allow_similar_names = true;
|
||||
pcx.assemble_inherent_candidates();
|
||||
pcx.assemble_extension_candidates_for_traits_in_scope(hir::DUMMY_HIR_ID)?;
|
||||
|
||||
let method_names = pcx.candidate_method_names();
|
||||
pcx.allow_similar_names = false;
|
||||
@ -1523,10 +1522,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
|
||||
pcx.reset();
|
||||
pcx.method_name = Some(method_name);
|
||||
pcx.assemble_inherent_candidates();
|
||||
pcx.assemble_extension_candidates_for_traits_in_scope(hir::DUMMY_HIR_ID)
|
||||
.map_or(None, |_| {
|
||||
pcx.pick_core().and_then(|pick| pick.ok()).map(|pick| pick.item)
|
||||
})
|
||||
pcx.pick_core().and_then(|pick| pick.ok()).map(|pick| pick.item)
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user