Fully render type alias completions from hir

This commit is contained in:
Lukas Wirth 2021-12-21 16:36:04 +01:00
parent 40d5c58a80
commit 7f7a3644b3
6 changed files with 17 additions and 36 deletions

View file

@ -50,21 +50,6 @@ pub fn function_declaration(node: &ast::Fn) -> String {
buf
}
pub fn type_label(node: &ast::TypeAlias) -> String {
let mut s = String::new();
if let Some(vis) = node.visibility() {
format_to!(s, "{} ", vis);
}
format_to!(s, "type ");
if let Some(name) = node.name() {
format_to!(s, "{}", name);
} else {
format_to!(s, "?");
}
format_to!(s, ";");
s
}
pub fn macro_label(node: &ast::Macro) -> String {
let name = node.name();
let mut s = String::new();