diff options
Diffstat (limited to 'crates/ra_hir_ty/src/lib.rs')
-rw-r--r-- | crates/ra_hir_ty/src/lib.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs index 60c7fd0e5..68c2f0b06 100644 --- a/crates/ra_hir_ty/src/lib.rs +++ b/crates/ra_hir_ty/src/lib.rs | |||
@@ -909,9 +909,16 @@ impl HirDisplay for ApplicationTy { | |||
909 | } | 909 | } |
910 | } | 910 | } |
911 | if self.parameters.len() > 0 { | 911 | if self.parameters.len() > 0 { |
912 | write!(f, "<")?; | 912 | let generics = generics(f.db, def.into()); |
913 | f.write_joined(&*self.parameters.0, ", ")?; | 913 | let (parent_params, self_param, type_params, _impl_trait_params) = |
914 | write!(f, ">")?; | 914 | generics.provenance_split(); |
915 | let total_len = parent_params + self_param + type_params; | ||
916 | // We print all params except implicit impl Trait params. Still a bit weird; should we leave out parent and self? | ||
917 | if total_len > 0 { | ||
918 | write!(f, "<")?; | ||
919 | f.write_joined(&self.parameters.0[..total_len], ", ")?; | ||
920 | write!(f, ">")?; | ||
921 | } | ||
915 | } | 922 | } |
916 | write!(f, "(")?; | 923 | write!(f, "(")?; |
917 | f.write_joined(sig.params(), ", ")?; | 924 | f.write_joined(sig.params(), ", ")?; |