diff options
author | Florian Diebold <[email protected]> | 2021-03-21 12:22:22 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-03-21 17:01:14 +0000 |
commit | 590c41635952e19c3caae525a827499dbd360049 (patch) | |
tree | eca7c162975ef901b723d255512e61c047e838b8 /crates/hir/src/display.rs | |
parent | 35868c4f7dc479dd5f731a2785ec6a203046ea9c (diff) |
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.
Diffstat (limited to 'crates/hir/src/display.rs')
-rw-r--r-- | crates/hir/src/display.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/hir/src/display.rs b/crates/hir/src/display.rs index 9f6d7be48..c96ebb50a 100644 --- a/crates/hir/src/display.rs +++ b/crates/hir/src/display.rs | |||
@@ -236,7 +236,11 @@ impl HirDisplay for TypeParam { | |||
236 | write!(f, "{}", self.name(f.db))?; | 236 | write!(f, "{}", self.name(f.db))?; |
237 | let bounds = f.db.generic_predicates_for_param(self.id); | 237 | let bounds = f.db.generic_predicates_for_param(self.id); |
238 | let substs = Substitution::type_params(f.db, self.id.parent); | 238 | let substs = Substitution::type_params(f.db, self.id.parent); |
239 | let predicates = bounds.iter().cloned().map(|b| b.subst(&substs)).collect::<Vec<_>>(); | 239 | let predicates = bounds |
240 | .iter() | ||
241 | .cloned() | ||
242 | .map(|b| hir_ty::Binders::new(0, b.subst(&substs))) | ||
243 | .collect::<Vec<_>>(); | ||
240 | if !(predicates.is_empty() || f.omit_verbose_types()) { | 244 | if !(predicates.is_empty() || f.omit_verbose_types()) { |
241 | write_bounds_like_dyn_trait_with_prefix(":", &predicates, f)?; | 245 | write_bounds_like_dyn_trait_with_prefix(":", &predicates, f)?; |
242 | } | 246 | } |