1
Fork 0

Separate bounds and predicates for associated/opaque types

This commit is contained in:
Matthew Jasper 2020-06-27 21:36:35 +01:00
parent d297147e62
commit f958e6c246
107 changed files with 923 additions and 1117 deletions

View file

@ -607,12 +607,13 @@ pub trait PrettyPrinter<'tcx>:
}
// Grab the "TraitA + TraitB" from `impl TraitA + TraitB`,
// by looking up the projections associated with the def_id.
let bounds = self.tcx().item_bounds(def_id).subst(self.tcx(), substs);
let bounds = self.tcx().explicit_item_bounds(def_id);
let mut first = true;
let mut is_sized = false;
p!("impl");
for predicate in bounds {
for (predicate, _) in bounds {
let predicate = predicate.subst(self.tcx(), substs);
// Note: We can't use `to_opt_poly_trait_ref` here as `predicate`
// may contain unbound variables. We therefore do this manually.
//