use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
use rustc_middle::ty::query::Providers;
use rustc_middle::ty::subst::GenericArgKind;
-use rustc_middle::ty::{self, CratePredicatesMap, ToPredicate, TyCtxt};
+use rustc_middle::ty::{self, CratePredicatesMap, TyCtxt};
use rustc_span::symbol::sym;
use rustc_span::Span;
let mut pred: Vec<String> = predicates
.iter()
.map(|(out_pred, _)| match out_pred.kind() {
- ty::PredicateKind::RegionOutlives(p) => p.to_string(),
- ty::PredicateKind::TypeOutlives(p) => p.to_string(),
+ ty::PredicateKind::Atom(ty::PredicateAtom::RegionOutlives(p)) => {
+ p.to_string()
+ }
+ ty::PredicateKind::Atom(ty::PredicateAtom::TypeOutlives(p)) => {
+ p.to_string()
+ }
err => bug!("unexpected predicate {:?}", err),
})
.collect();
|(ty::OutlivesPredicate(kind1, region2), &span)| {
match kind1.unpack() {
GenericArgKind::Type(ty1) => Some((
- ty::PredicateKind::TypeOutlives(ty::Binder::bind(
- ty::OutlivesPredicate(ty1, region2),
- ))
- .to_predicate(tcx),
+ ty::PredicateAtom::TypeOutlives(ty::OutlivesPredicate(ty1, region2))
+ .potentially_quantified(tcx, ty::PredicateKind::ForAll),
span,
)),
GenericArgKind::Lifetime(region1) => Some((
- ty::PredicateKind::RegionOutlives(ty::Binder::bind(
- ty::OutlivesPredicate(region1, region2),
+ ty::PredicateAtom::RegionOutlives(ty::OutlivesPredicate(
+ region1, region2,
))
- .to_predicate(tcx),
+ .potentially_quantified(tcx, ty::PredicateKind::ForAll),
span,
)),
GenericArgKind::Const(_) => {