mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-29 06:23:25 +00:00
Fix type alias hovers not rendering generic parameters
This commit is contained in:
parent
39eaf7864c
commit
77cfc9b392
1 changed files with 3 additions and 0 deletions
|
@ -492,6 +492,9 @@ impl HirDisplay for TypeAlias {
|
||||||
write_visibility(self.module(f.db).id, self.visibility(f.db), f)?;
|
write_visibility(self.module(f.db).id, self.visibility(f.db), f)?;
|
||||||
let data = f.db.type_alias_data(self.id);
|
let data = f.db.type_alias_data(self.id);
|
||||||
write!(f, "type {}", data.name)?;
|
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() {
|
if !data.bounds.is_empty() {
|
||||||
f.write_str(": ")?;
|
f.write_str(": ")?;
|
||||||
f.write_joined(&data.bounds, " + ")?;
|
f.write_joined(&data.bounds, " + ")?;
|
||||||
|
|
Loading…
Reference in a new issue