mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
internal: Support registered tools and attributes in ide layer
This commit is contained in:
parent
8887d2016f
commit
dc135cc076
4 changed files with 76 additions and 19 deletions
|
@ -393,7 +393,10 @@ fn render_builtin_attr(db: &RootDatabase, attr: hir::BuiltinAttr) -> Option<Mark
|
|||
let name = attr.name(db);
|
||||
let desc = format!("#[{}]", name);
|
||||
|
||||
let AttributeTemplate { word, list, name_value_str } = attr.template(db);
|
||||
let AttributeTemplate { word, list, name_value_str } = match attr.template(db) {
|
||||
Some(template) => template,
|
||||
None => return Some(Markup::fenced_block(&attr.name(db))),
|
||||
};
|
||||
let mut docs = "Valid forms are:".to_owned();
|
||||
if word {
|
||||
format_to!(docs, "\n - #\\[{}]", name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue