Rollup merge of #132344 - compiler-errors:same-thing, r=lcnr

Merge `HostPolarity` and `BoundConstness`

They're basically the same thing, and I think `BoundConstness` is easier to use.

r? fee1-dead or reassign
This commit is contained in:
Jubilee
2024-10-30 14:01:38 -07:00
committed by GitHub
16 changed files with 66 additions and 81 deletions

View File

@@ -218,7 +218,7 @@ fn compare_method_predicate_entailment<'tcx>(
tcx.const_conditions(trait_m.def_id).instantiate_own(tcx, trait_to_impl_args),
)
.map(|(trait_ref, _)| {
trait_ref.to_host_effect_clause(tcx, ty::HostPolarity::Maybe)
trait_ref.to_host_effect_clause(tcx, ty::BoundConstness::Maybe)
}),
);
}
@@ -272,7 +272,7 @@ fn compare_method_predicate_entailment<'tcx>(
tcx,
cause,
param_env,
const_condition.to_host_effect_clause(tcx, ty::HostPolarity::Maybe),
const_condition.to_host_effect_clause(tcx, ty::BoundConstness::Maybe),
));
}
}
@@ -1942,7 +1942,7 @@ fn compare_type_predicate_entailment<'tcx>(
tcx.const_conditions(trait_ty.def_id).instantiate_own(tcx, trait_to_impl_args),
)
.map(|(trait_ref, _)| {
trait_ref.to_host_effect_clause(tcx, ty::HostPolarity::Maybe)
trait_ref.to_host_effect_clause(tcx, ty::BoundConstness::Maybe)
}),
);
}
@@ -1985,7 +1985,7 @@ fn compare_type_predicate_entailment<'tcx>(
tcx,
cause,
param_env,
const_condition.to_host_effect_clause(tcx, ty::HostPolarity::Maybe),
const_condition.to_host_effect_clause(tcx, ty::BoundConstness::Maybe),
));
}
}
@@ -2091,7 +2091,7 @@ pub(super) fn check_type_bounds<'tcx>(
tcx,
mk_cause(span),
param_env,
c.to_host_effect_clause(tcx, ty::HostPolarity::Maybe),
c.to_host_effect_clause(tcx, ty::BoundConstness::Maybe),
)
}),
);

View File

@@ -1388,7 +1388,7 @@ fn check_impl<'tcx>(
ObligationCauseCode::WellFormed(None),
),
wfcx.param_env,
bound.to_host_effect_clause(tcx, ty::HostPolarity::Maybe),
bound.to_host_effect_clause(tcx, ty::BoundConstness::Maybe),
))
}
}