Apply EarlyBinder
only to TraitRef
in ImplTraitHeader
This commit is contained in:
parent
8c9a75b323
commit
9669934798
22 changed files with 74 additions and 82 deletions
|
@ -47,14 +47,14 @@ impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> {
|
|||
let drcx = DeepRejectCtxt { treat_obligation_params: TreatParams::ForLookup };
|
||||
if !drcx.args_may_unify(
|
||||
goal.predicate.trait_ref.args,
|
||||
impl_trait_header.skip_binder().trait_ref.args,
|
||||
impl_trait_header.trait_ref.skip_binder().args,
|
||||
) {
|
||||
return Err(NoSolution);
|
||||
}
|
||||
|
||||
// An upper bound of the certainty of this goal, used to lower the certainty
|
||||
// of reservation impl to ambiguous during coherence.
|
||||
let impl_polarity = impl_trait_header.skip_binder().polarity;
|
||||
let impl_polarity = impl_trait_header.polarity;
|
||||
let maximal_certainty = match impl_polarity {
|
||||
ty::ImplPolarity::Positive | ty::ImplPolarity::Negative => {
|
||||
match impl_polarity == goal.predicate.polarity {
|
||||
|
@ -70,7 +70,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> {
|
|||
|
||||
ecx.probe_trait_candidate(CandidateSource::Impl(impl_def_id)).enter(|ecx| {
|
||||
let impl_args = ecx.fresh_args_for_item(impl_def_id);
|
||||
let impl_trait_ref = impl_trait_header.instantiate(tcx, impl_args).trait_ref;
|
||||
let impl_trait_ref = impl_trait_header.trait_ref.instantiate(tcx, impl_args);
|
||||
|
||||
ecx.eq(goal.param_env, goal.predicate.trait_ref, impl_trait_ref)?;
|
||||
let where_clause_bounds = tcx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue