mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Introduce QuantifiedWhereClause and DynTy analogous to Chalk
This introduces a bunch of new binders in lots of places, which we have to be careful about, but we had to add them at some point.
This commit is contained in:
parent
35868c4f7d
commit
590c416359
8 changed files with 213 additions and 105 deletions
|
@ -236,7 +236,11 @@ 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| b.subst(&substs)).collect::<Vec<_>>();
|
||||
let predicates = bounds
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|b| hir_ty::Binders::new(0, 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