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