attempt to re-add ty::Unevaluated
visitor and friends
This commit is contained in:
parent
71bbb603f4
commit
dec8ed438c
21 changed files with 174 additions and 121 deletions
|
@ -237,9 +237,9 @@ fn ensure_drop_predicates_are_implied_by_item_defn<'tcx>(
|
|||
relator.relate(predicate.rebind(a), p.rebind(b)).is_ok()
|
||||
}
|
||||
(
|
||||
ty::PredicateKind::ConstEvaluatable(a_def, a_substs),
|
||||
ty::PredicateKind::ConstEvaluatable(b_def, b_substs),
|
||||
) => tcx.try_unify_abstract_consts(((a_def, a_substs), (b_def, b_substs))),
|
||||
ty::PredicateKind::ConstEvaluatable(a),
|
||||
ty::PredicateKind::ConstEvaluatable(b),
|
||||
) => tcx.try_unify_abstract_consts((a, b)),
|
||||
(
|
||||
ty::PredicateKind::TypeOutlives(ty::OutlivesPredicate(ty_a, lt_a)),
|
||||
ty::PredicateKind::TypeOutlives(ty::OutlivesPredicate(ty_b, lt_b)),
|
||||
|
|
|
@ -972,10 +972,10 @@ fn check_type_defn<'tcx, F>(
|
|||
fcx.register_predicate(traits::Obligation::new(
|
||||
cause,
|
||||
fcx.param_env,
|
||||
ty::Binder::dummy(ty::PredicateKind::ConstEvaluatable(
|
||||
ty::Binder::dummy(ty::PredicateKind::ConstEvaluatable(ty::Unevaluated::new(
|
||||
ty::WithOptConstParam::unknown(discr_def_id.to_def_id()),
|
||||
discr_substs,
|
||||
))
|
||||
)))
|
||||
.to_predicate(tcx),
|
||||
));
|
||||
}
|
||||
|
|
|
@ -2313,7 +2313,7 @@ fn const_evaluatable_predicates_of<'tcx>(
|
|||
assert_eq!(uv.promoted, None);
|
||||
let span = self.tcx.hir().span(c.hir_id);
|
||||
self.preds.insert((
|
||||
ty::Binder::dummy(ty::PredicateKind::ConstEvaluatable(uv.def, uv.substs))
|
||||
ty::Binder::dummy(ty::PredicateKind::ConstEvaluatable(uv.shrink()))
|
||||
.to_predicate(self.tcx),
|
||||
span,
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue