1
Fork 0

Intermediate formatting and such

This commit is contained in:
Jack Huey 2020-12-23 13:16:25 -05:00
parent 8278314a8b
commit 4cb3d6f983
7 changed files with 63 additions and 74 deletions

View file

@ -30,12 +30,13 @@ fn inferred_outlives_of(tcx: TyCtxt<'_>, item_def_id: DefId) -> &[(ty::Predicate
if tcx.has_attr(item_def_id, sym::rustc_outlives) {
let mut pred: Vec<String> = predicates
.iter()
.map(|(out_pred, _)| match out_pred.kind() {
ty::PredicateKind::ForAll(binder) => match binder.skip_binder() {
.map(|(out_pred, _)| {
let ty::PredicateKind::ForAll(binder) = out_pred.kind();
match binder.skip_binder() {
ty::PredicateAtom::RegionOutlives(p) => p.to_string(),
ty::PredicateAtom::TypeOutlives(p) => p.to_string(),
err => bug!("unexpected predicate {:?}", err),
},
}
})
.collect();
pred.sort();