diff options
Diffstat (limited to 'crates/hir/src/has_source.rs')
-rw-r--r-- | crates/hir/src/has_source.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir/src/has_source.rs b/crates/hir/src/has_source.rs index 04845037f..c5b81b252 100644 --- a/crates/hir/src/has_source.rs +++ b/crates/hir/src/has_source.rs | |||
@@ -10,8 +10,8 @@ use hir_expand::InFile; | |||
10 | use syntax::ast; | 10 | use syntax::ast; |
11 | 11 | ||
12 | use crate::{ | 12 | use crate::{ |
13 | db::HirDatabase, Const, Enum, EnumVariant, Field, FieldSource, Function, ImplDef, | 13 | db::HirDatabase, Const, Enum, EnumVariant, Field, FieldSource, Function, Impl, LifetimeParam, |
14 | LifetimeParam, MacroDef, Module, Static, Struct, Trait, TypeAlias, TypeParam, Union, | 14 | MacroDef, Module, Static, Struct, Trait, TypeAlias, TypeParam, Union, |
15 | }; | 15 | }; |
16 | 16 | ||
17 | pub trait HasSource { | 17 | pub trait HasSource { |
@@ -110,15 +110,15 @@ impl HasSource for TypeAlias { | |||
110 | } | 110 | } |
111 | } | 111 | } |
112 | impl HasSource for MacroDef { | 112 | impl HasSource for MacroDef { |
113 | type Ast = ast::MacroRules; | 113 | type Ast = ast::Macro; |
114 | fn source(self, db: &dyn HirDatabase) -> InFile<ast::MacroRules> { | 114 | fn source(self, db: &dyn HirDatabase) -> InFile<ast::Macro> { |
115 | InFile { | 115 | InFile { |
116 | file_id: self.id.ast_id.expect("MacroDef without ast_id").file_id, | 116 | file_id: self.id.ast_id.expect("MacroDef without ast_id").file_id, |
117 | value: self.id.ast_id.expect("MacroDef without ast_id").to_node(db.upcast()), | 117 | value: self.id.ast_id.expect("MacroDef without ast_id").to_node(db.upcast()), |
118 | } | 118 | } |
119 | } | 119 | } |
120 | } | 120 | } |
121 | impl HasSource for ImplDef { | 121 | impl HasSource for Impl { |
122 | type Ast = ast::Impl; | 122 | type Ast = ast::Impl; |
123 | fn source(self, db: &dyn HirDatabase) -> InFile<ast::Impl> { | 123 | fn source(self, db: &dyn HirDatabase) -> InFile<ast::Impl> { |
124 | self.id.lookup(db.upcast()).source(db.upcast()) | 124 | self.id.lookup(db.upcast()).source(db.upcast()) |