diff options
Diffstat (limited to 'crates/ra_hir/src/docs.rs')
-rw-r--r-- | crates/ra_hir/src/docs.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_hir/src/docs.rs b/crates/ra_hir/src/docs.rs index 900fd2aa8..1b0f84de5 100644 --- a/crates/ra_hir/src/docs.rs +++ b/crates/ra_hir/src/docs.rs | |||
@@ -4,7 +4,7 @@ use ra_syntax::ast; | |||
4 | 4 | ||
5 | use crate::{ | 5 | use crate::{ |
6 | HirDatabase, DefDatabase, AstDatabase, | 6 | HirDatabase, DefDatabase, AstDatabase, |
7 | Module, StructField, Struct, Enum, EnumVariant, Static, Const, Function, Union, Trait, TypeAlias, FieldSource | 7 | Module, StructField, Struct, Enum, EnumVariant, Static, Const, Function, Union, Trait, TypeAlias, FieldSource, MacroDef, |
8 | }; | 8 | }; |
9 | 9 | ||
10 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] | 10 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
@@ -20,6 +20,7 @@ pub enum DocDef { | |||
20 | Union(Union), | 20 | Union(Union), |
21 | Trait(Trait), | 21 | Trait(Trait), |
22 | TypeAlias(TypeAlias), | 22 | TypeAlias(TypeAlias), |
23 | MacroDef(MacroDef), | ||
23 | } | 24 | } |
24 | 25 | ||
25 | impl_froms!( | 26 | impl_froms!( |
@@ -33,7 +34,8 @@ impl_froms!( | |||
33 | Function, | 34 | Function, |
34 | Union, | 35 | Union, |
35 | Trait, | 36 | Trait, |
36 | TypeAlias | 37 | TypeAlias, |
38 | MacroDef | ||
37 | ); | 39 | ); |
38 | 40 | ||
39 | /// Holds documentation | 41 | /// Holds documentation |
@@ -83,6 +85,7 @@ pub(crate) fn documentation_query( | |||
83 | DocDef::Union(it) => docs_from_ast(&*it.source(db).1), | 85 | DocDef::Union(it) => docs_from_ast(&*it.source(db).1), |
84 | DocDef::Trait(it) => docs_from_ast(&*it.source(db).1), | 86 | DocDef::Trait(it) => docs_from_ast(&*it.source(db).1), |
85 | DocDef::TypeAlias(it) => docs_from_ast(&*it.source(db).1), | 87 | DocDef::TypeAlias(it) => docs_from_ast(&*it.source(db).1), |
88 | DocDef::MacroDef(it) => docs_from_ast(&*it.source(db).1), | ||
86 | } | 89 | } |
87 | } | 90 | } |
88 | 91 | ||