Merge HostPolarity and BoundConstness
This commit is contained in:
@@ -716,7 +716,7 @@ pub(super) fn assert_only_contains_predicates_from<'tcx>(
|
||||
match clause.kind().skip_binder() {
|
||||
ty::ClauseKind::HostEffect(ty::HostEffectPredicate {
|
||||
trait_ref: _,
|
||||
host: ty::HostPolarity::Maybe,
|
||||
constness: ty::BoundConstness::Maybe,
|
||||
}) => {}
|
||||
_ => {
|
||||
bug!(
|
||||
@@ -732,8 +732,8 @@ pub(super) fn assert_only_contains_predicates_from<'tcx>(
|
||||
match clause.kind().skip_binder() {
|
||||
ty::ClauseKind::HostEffect(pred) => {
|
||||
assert_eq!(
|
||||
pred.host,
|
||||
ty::HostPolarity::Maybe,
|
||||
pred.constness,
|
||||
ty::BoundConstness::Maybe,
|
||||
"expected `~const` predicate when computing `{filter:?}` \
|
||||
implied bounds: {clause:?}",
|
||||
);
|
||||
@@ -943,7 +943,7 @@ pub(super) fn const_conditions<'tcx>(
|
||||
bounds.push_const_bound(
|
||||
tcx,
|
||||
ty::Binder::dummy(ty::TraitRef::identity(tcx, def_id.to_def_id())),
|
||||
ty::HostPolarity::Maybe,
|
||||
ty::BoundConstness::Maybe,
|
||||
DUMMY_SP,
|
||||
);
|
||||
|
||||
@@ -963,7 +963,7 @@ pub(super) fn const_conditions<'tcx>(
|
||||
clause.kind().map_bound(|clause| match clause {
|
||||
ty::ClauseKind::HostEffect(ty::HostEffectPredicate {
|
||||
trait_ref,
|
||||
host: ty::HostPolarity::Maybe,
|
||||
constness: ty::BoundConstness::Maybe,
|
||||
}) => trait_ref,
|
||||
_ => bug!("converted {clause:?}"),
|
||||
}),
|
||||
@@ -1001,7 +1001,7 @@ pub(super) fn implied_const_bounds<'tcx>(
|
||||
clause.kind().map_bound(|clause| match clause {
|
||||
ty::ClauseKind::HostEffect(ty::HostEffectPredicate {
|
||||
trait_ref,
|
||||
host: ty::HostPolarity::Maybe,
|
||||
constness: ty::BoundConstness::Maybe,
|
||||
}) => trait_ref,
|
||||
_ => bug!("converted {clause:?}"),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user