mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
one macro def should be enough
This commit is contained in:
parent
2c28f5245d
commit
1b783e33e9
6 changed files with 25 additions and 33 deletions
|
@ -4,7 +4,7 @@ use ra_syntax::ast;
|
|||
|
||||
use crate::{
|
||||
HirDatabase, DefDatabase, AstDatabase,
|
||||
Module, StructField, Struct, Enum, EnumVariant, Static, Const, Function, Union, Trait, TypeAlias, FieldSource
|
||||
Module, StructField, Struct, Enum, EnumVariant, Static, Const, Function, Union, Trait, TypeAlias, FieldSource, MacroDef,
|
||||
};
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
|
@ -20,6 +20,7 @@ pub enum DocDef {
|
|||
Union(Union),
|
||||
Trait(Trait),
|
||||
TypeAlias(TypeAlias),
|
||||
MacroDef(MacroDef),
|
||||
}
|
||||
|
||||
impl_froms!(
|
||||
|
@ -33,7 +34,8 @@ impl_froms!(
|
|||
Function,
|
||||
Union,
|
||||
Trait,
|
||||
TypeAlias
|
||||
TypeAlias,
|
||||
MacroDef
|
||||
);
|
||||
|
||||
/// Holds documentation
|
||||
|
@ -83,6 +85,7 @@ pub(crate) fn documentation_query(
|
|||
DocDef::Union(it) => docs_from_ast(&*it.source(db).1),
|
||||
DocDef::Trait(it) => docs_from_ast(&*it.source(db).1),
|
||||
DocDef::TypeAlias(it) => docs_from_ast(&*it.source(db).1),
|
||||
DocDef::MacroDef(it) => docs_from_ast(&*it.source(db).1),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue