diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2022-10-01 00:21:29 +0200 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2022-10-01 00:21:29 +0200 |
| commit | 77cfc9b3921dfb9ce0df891a3b6be3e9cb3da656 (patch) | |
| tree | 13e6a1e4fa4d9d629046bbbf5766944eb2eb451e | |
| parent | 39eaf7864cd786d53e98771864a689ff0f9b9259 (diff) | |
| download | rust-77cfc9b3921dfb9ce0df891a3b6be3e9cb3da656.tar.gz rust-77cfc9b3921dfb9ce0df891a3b6be3e9cb3da656.zip | |
Fix type alias hovers not rendering generic parameters
| -rw-r--r-- | crates/hir/src/display.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/hir/src/display.rs b/crates/hir/src/display.rs index 0e29c52ade6..27b2f445d73 100644 --- a/crates/hir/src/display.rs +++ b/crates/hir/src/display.rs @@ -492,6 +492,9 @@ impl HirDisplay for TypeAlias { write_visibility(self.module(f.db).id, self.visibility(f.db), f)?; let data = f.db.type_alias_data(self.id); write!(f, "type {}", data.name)?; + let def_id = GenericDefId::TypeAliasId(self.id); + write_generic_params(def_id, f)?; + write_where_clause(def_id, f)?; if !data.bounds.is_empty() { f.write_str(": ")?; f.write_joined(&data.bounds, " + ")?; |
