Use QuantifiedWhereClause in generic_predicates as well
Still far too much binder skipping going on; I find it hard to imagine this is all correct, but the tests pass.
This commit is contained in:
@@ -236,11 +236,7 @@ impl HirDisplay for TypeParam {
|
||||
write!(f, "{}", self.name(f.db))?;
|
||||
let bounds = f.db.generic_predicates_for_param(self.id);
|
||||
let substs = Substitution::type_params(f.db, self.id.parent);
|
||||
let predicates = bounds
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|b| hir_ty::Binders::new(0, b.subst(&substs)))
|
||||
.collect::<Vec<_>>();
|
||||
let predicates = bounds.iter().cloned().map(|b| b.subst(&substs)).collect::<Vec<_>>();
|
||||
if !(predicates.is_empty() || f.omit_verbose_types()) {
|
||||
write_bounds_like_dyn_trait_with_prefix(":", &predicates, f)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user