mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Improve hover message for inert attributes
This commit is contained in:
parent
d174158abc
commit
8da850b6d5
4 changed files with 75 additions and 7 deletions
|
@ -103,6 +103,7 @@ pub use {
|
|||
hir_def::{
|
||||
adt::StructKind,
|
||||
attr::{Attr, Attrs, AttrsWithOwner, Documentation},
|
||||
builtin_attr::AttributeTemplate,
|
||||
find_path::PrefixKind,
|
||||
import_map,
|
||||
item_scope::ItemScope,
|
||||
|
@ -2036,6 +2037,10 @@ impl BuiltinAttr {
|
|||
// FIXME: Return a `Name` here
|
||||
hir_def::builtin_attr::INERT_ATTRIBUTES[self.0].name
|
||||
}
|
||||
|
||||
pub fn template(&self, _: &dyn HirDatabase) -> AttributeTemplate {
|
||||
hir_def::builtin_attr::INERT_ATTRIBUTES[self.0].template
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue