diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-12 14:20:02 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-12 14:20:02 +0000 |
commit | c213c3b36b7987504c6c3703b76a637dd0d01355 (patch) | |
tree | 36f9066ab25826f9401216d6ff371954eb9f447c /crates/ra_hir/src/has_source.rs | |
parent | d8dba7fbe587ba5fb6cfe939083ccd92c61f5827 (diff) | |
parent | 7a255a2f9381ba5886cacc48c1dd0420a739a55c (diff) |
Merge #2539
2539: Remove old location infra r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/has_source.rs')
-rw-r--r-- | crates/ra_hir/src/has_source.rs | 10 |
1 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 a888fe995..72afecf26 100644 --- a/crates/ra_hir/src/has_source.rs +++ b/crates/ra_hir/src/has_source.rs | |||
@@ -4,7 +4,7 @@ use either::Either; | |||
4 | use hir_def::{ | 4 | use hir_def::{ |
5 | nameres::ModuleSource, | 5 | nameres::ModuleSource, |
6 | src::{HasChildSource, HasSource as _}, | 6 | src::{HasChildSource, HasSource as _}, |
7 | AstItemDef, Lookup, VariantId, | 7 | Lookup, VariantId, |
8 | }; | 8 | }; |
9 | use ra_syntax::ast; | 9 | use ra_syntax::ast; |
10 | 10 | ||
@@ -51,19 +51,19 @@ impl HasSource for StructField { | |||
51 | impl HasSource for Struct { | 51 | impl HasSource for Struct { |
52 | type Ast = ast::StructDef; | 52 | type Ast = ast::StructDef; |
53 | fn source(self, db: &impl DefDatabase) -> InFile<ast::StructDef> { | 53 | fn source(self, db: &impl DefDatabase) -> InFile<ast::StructDef> { |
54 | self.id.source(db) | 54 | self.id.lookup(db).source(db) |
55 | } | 55 | } |
56 | } | 56 | } |
57 | impl HasSource for Union { | 57 | impl HasSource for Union { |
58 | type Ast = ast::UnionDef; | 58 | type Ast = ast::UnionDef; |
59 | fn source(self, db: &impl DefDatabase) -> InFile<ast::UnionDef> { | 59 | fn source(self, db: &impl DefDatabase) -> InFile<ast::UnionDef> { |
60 | self.id.source(db) | 60 | self.id.lookup(db).source(db) |
61 | } | 61 | } |
62 | } | 62 | } |
63 | impl HasSource for Enum { | 63 | impl HasSource for Enum { |
64 | type Ast = ast::EnumDef; | 64 | type Ast = ast::EnumDef; |
65 | fn source(self, db: &impl DefDatabase) -> InFile<ast::EnumDef> { | 65 | fn source(self, db: &impl DefDatabase) -> InFile<ast::EnumDef> { |
66 | self.id.source(db) | 66 | self.id.lookup(db).source(db) |
67 | } | 67 | } |
68 | } | 68 | } |
69 | impl HasSource for EnumVariant { | 69 | impl HasSource for EnumVariant { |
@@ -93,7 +93,7 @@ impl HasSource for Static { | |||
93 | impl HasSource for Trait { | 93 | impl HasSource for Trait { |
94 | type Ast = ast::TraitDef; | 94 | type Ast = ast::TraitDef; |
95 | fn source(self, db: &impl DefDatabase) -> InFile<ast::TraitDef> { | 95 | fn source(self, db: &impl DefDatabase) -> InFile<ast::TraitDef> { |
96 | self.id.source(db) | 96 | self.id.lookup(db).source(db) |
97 | } | 97 | } |
98 | } | 98 | } |
99 | impl HasSource for TypeAlias { | 99 | impl HasSource for TypeAlias { |