Skip to content

Commit 53db641

Browse files
Uplift fast rejection to new solver
1 parent d1b7355 commit 53db641

File tree

13 files changed

+419
-402
lines changed

13 files changed

+419
-402
lines changed

compiler/rustc_hir_typeck/src/method/suggest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2129,7 +2129,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
21292129
let target_ty = self
21302130
.autoderef(sugg_span, rcvr_ty)
21312131
.find(|(rcvr_ty, _)| {
2132-
DeepRejectCtxt { treat_obligation_params: TreatParams::AsCandidateKey }
2132+
DeepRejectCtxt::new(self.tcx, TreatParams::ForLookup)
21332133
.types_may_unify(*rcvr_ty, impl_ty)
21342134
})
21352135
.map_or(impl_ty, |(ty, _)| ty)

compiler/rustc_middle/src/ty/context.rs

-11
Original file line numberDiff line numberDiff line change
@@ -373,17 +373,6 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
373373
.map(|assoc_item| assoc_item.def_id)
374374
}
375375

376-
fn args_may_unify_deep(
377-
self,
378-
obligation_args: ty::GenericArgsRef<'tcx>,
379-
impl_args: ty::GenericArgsRef<'tcx>,
380-
) -> bool {
381-
ty::fast_reject::DeepRejectCtxt {
382-
treat_obligation_params: ty::fast_reject::TreatParams::ForLookup,
383-
}
384-
.args_may_unify(obligation_args, impl_args)
385-
}
386-
387376
// This implementation is a bit different from `TyCtxt::for_each_relevant_impl`,
388377
// since we want to skip over blanket impls for non-rigid aliases, and also we
389378
// only want to consider types that *actually* unify with float/int vars.

0 commit comments

Comments
 (0)