diff options
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/has_source.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir/src/semantics.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/semantics/source_to_def.rs | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir/src/has_source.rs b/crates/ra_hir/src/has_source.rs index 88399f724..1c5747581 100644 --- a/crates/ra_hir/src/has_source.rs +++ b/crates/ra_hir/src/has_source.rs | |||
@@ -75,8 +75,8 @@ impl HasSource for Enum { | |||
75 | } | 75 | } |
76 | } | 76 | } |
77 | impl HasSource for EnumVariant { | 77 | impl HasSource for EnumVariant { |
78 | type Ast = ast::EnumVariant; | 78 | type Ast = ast::Variant; |
79 | fn source(self, db: &dyn HirDatabase) -> InFile<ast::EnumVariant> { | 79 | fn source(self, db: &dyn HirDatabase) -> InFile<ast::Variant> { |
80 | self.parent.id.child_source(db.upcast()).map(|map| map[self.id].clone()) | 80 | self.parent.id.child_source(db.upcast()).map(|map| map[self.id].clone()) |
81 | } | 81 | } |
82 | } | 82 | } |
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index f8e70fe27..e18df2537 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs | |||
@@ -591,7 +591,7 @@ to_def_impls![ | |||
591 | (crate::Function, ast::Fn, fn_to_def), | 591 | (crate::Function, ast::Fn, fn_to_def), |
592 | (crate::Field, ast::RecordField, record_field_to_def), | 592 | (crate::Field, ast::RecordField, record_field_to_def), |
593 | (crate::Field, ast::TupleField, tuple_field_to_def), | 593 | (crate::Field, ast::TupleField, tuple_field_to_def), |
594 | (crate::EnumVariant, ast::EnumVariant, enum_variant_to_def), | 594 | (crate::EnumVariant, ast::Variant, enum_variant_to_def), |
595 | (crate::TypeParam, ast::TypeParam, type_param_to_def), | 595 | (crate::TypeParam, ast::TypeParam, type_param_to_def), |
596 | (crate::MacroDef, ast::MacroCall, macro_call_to_def), // this one is dubious, not all calls are macros | 596 | (crate::MacroDef, ast::MacroCall, macro_call_to_def), // this one is dubious, not all calls are macros |
597 | (crate::Local, ast::BindPat, bind_pat_to_def), | 597 | (crate::Local, ast::BindPat, bind_pat_to_def), |
diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs index 9f81b952f..b85a12680 100644 --- a/crates/ra_hir/src/semantics/source_to_def.rs +++ b/crates/ra_hir/src/semantics/source_to_def.rs | |||
@@ -100,9 +100,9 @@ impl SourceToDefCtx<'_, '_> { | |||
100 | } | 100 | } |
101 | pub(super) fn enum_variant_to_def( | 101 | pub(super) fn enum_variant_to_def( |
102 | &mut self, | 102 | &mut self, |
103 | src: InFile<ast::EnumVariant>, | 103 | src: InFile<ast::Variant>, |
104 | ) -> Option<EnumVariantId> { | 104 | ) -> Option<EnumVariantId> { |
105 | self.to_def(src, keys::ENUM_VARIANT) | 105 | self.to_def(src, keys::VARIANT) |
106 | } | 106 | } |
107 | pub(super) fn bind_pat_to_def( | 107 | pub(super) fn bind_pat_to_def( |
108 | &mut self, | 108 | &mut self, |