Intermediate formatting and such
This commit is contained in:
parent
8278314a8b
commit
4cb3d6f983
7 changed files with 63 additions and 74 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue