aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/has_source.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src/has_source.rs')
-rw-r--r--crates/hir/src/has_source.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir/src/has_source.rs b/crates/hir/src/has_source.rs
index c5b81b252..0dc07c33e 100644
--- a/crates/hir/src/has_source.rs
+++ b/crates/hir/src/has_source.rs
@@ -10,8 +10,8 @@ use hir_expand::InFile;
10use syntax::ast; 10use syntax::ast;
11 11
12use crate::{ 12use crate::{
13 db::HirDatabase, Const, Enum, EnumVariant, Field, FieldSource, Function, Impl, LifetimeParam, 13 db::HirDatabase, Const, Enum, Field, FieldSource, Function, Impl, LifetimeParam, MacroDef,
14 MacroDef, Module, Static, Struct, Trait, TypeAlias, TypeParam, Union, 14 Module, Static, Struct, Trait, TypeAlias, TypeParam, Union, Variant,
15}; 15};
16 16
17pub trait HasSource { 17pub trait HasSource {
@@ -73,7 +73,7 @@ impl HasSource for Enum {
73 self.id.lookup(db.upcast()).source(db.upcast()) 73 self.id.lookup(db.upcast()).source(db.upcast())
74 } 74 }
75} 75}
76impl HasSource for EnumVariant { 76impl HasSource for Variant {
77 type Ast = ast::Variant; 77 type Ast = ast::Variant;
78 fn source(self, db: &dyn HirDatabase) -> InFile<ast::Variant> { 78 fn source(self, db: &dyn HirDatabase) -> InFile<ast::Variant> {
79 self.parent.id.child_source(db.upcast()).map(|map| map[self.id].clone()) 79 self.parent.id.child_source(db.upcast()).map(|map| map[self.id].clone())