mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Fully render type alias completions from hir
This commit is contained in:
parent
40d5c58a80
commit
7f7a3644b3
6 changed files with 17 additions and 36 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue