mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Show alias underlying type
This commit is contained in:
parent
96f9f0741f
commit
cafaab8b96
1 changed files with 5 additions and 1 deletions
|
@ -61,7 +61,11 @@ impl ShortLabel for ast::BlockExpr {
|
||||||
|
|
||||||
impl ShortLabel for ast::TypeAlias {
|
impl ShortLabel for ast::TypeAlias {
|
||||||
fn short_label(&self) -> Option<String> {
|
fn short_label(&self) -> Option<String> {
|
||||||
short_label_from_node(self, "type ")
|
let mut buf = short_label_from_node(self, "type ")?;
|
||||||
|
if let Some(type_ref) = self.ty() {
|
||||||
|
format_to!(buf, " = {}", type_ref.syntax());
|
||||||
|
}
|
||||||
|
Some(buf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue