mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
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:
parent
590c416359
commit
1d5c4a77fb
9 changed files with 28 additions and 37 deletions
|
@ -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)?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue