diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-28 10:02:46 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-28 10:02:46 +0000 |
commit | 16030528b53d38e24c1e5733aa4cc46058d0bbd1 (patch) | |
tree | e878f88aebf11c0e54eff2e107dfaa4d192ab272 /crates/ra_ide/src/impls.rs | |
parent | 2702fa1c5d6d8ad504c0d7703b6363ea09ba5570 (diff) | |
parent | ccd1b0800a5de5e046e6e9a4b6f49030c1ce3639 (diff) |
Merge #2440
2440: Rename Source -> InFile r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/impls.rs')
-rw-r--r-- | crates/ra_ide/src/impls.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide/src/impls.rs b/crates/ra_ide/src/impls.rs index aa480e399..9b165ee2a 100644 --- a/crates/ra_ide/src/impls.rs +++ b/crates/ra_ide/src/impls.rs | |||
@@ -16,7 +16,7 @@ pub(crate) fn goto_implementation( | |||
16 | let src = hir::ModuleSource::from_position(db, position); | 16 | let src = hir::ModuleSource::from_position(db, position); |
17 | let module = hir::Module::from_definition( | 17 | let module = hir::Module::from_definition( |
18 | db, | 18 | db, |
19 | hir::Source { file_id: position.file_id.into(), value: src }, | 19 | hir::InFile { file_id: position.file_id.into(), value: src }, |
20 | )?; | 20 | )?; |
21 | 21 | ||
22 | if let Some(nominal_def) = find_node_at_offset::<ast::NominalDef>(&syntax, position.offset) { | 22 | if let Some(nominal_def) = find_node_at_offset::<ast::NominalDef>(&syntax, position.offset) { |
@@ -42,15 +42,15 @@ fn impls_for_def( | |||
42 | ) -> Option<Vec<NavigationTarget>> { | 42 | ) -> Option<Vec<NavigationTarget>> { |
43 | let ty = match node { | 43 | let ty = match node { |
44 | ast::NominalDef::StructDef(def) => { | 44 | ast::NominalDef::StructDef(def) => { |
45 | let src = hir::Source { file_id: position.file_id.into(), value: def.clone() }; | 45 | let src = hir::InFile { file_id: position.file_id.into(), value: def.clone() }; |
46 | hir::Struct::from_source(db, src)?.ty(db) | 46 | hir::Struct::from_source(db, src)?.ty(db) |
47 | } | 47 | } |
48 | ast::NominalDef::EnumDef(def) => { | 48 | ast::NominalDef::EnumDef(def) => { |
49 | let src = hir::Source { file_id: position.file_id.into(), value: def.clone() }; | 49 | let src = hir::InFile { file_id: position.file_id.into(), value: def.clone() }; |
50 | hir::Enum::from_source(db, src)?.ty(db) | 50 | hir::Enum::from_source(db, src)?.ty(db) |
51 | } | 51 | } |
52 | ast::NominalDef::UnionDef(def) => { | 52 | ast::NominalDef::UnionDef(def) => { |
53 | let src = hir::Source { file_id: position.file_id.into(), value: def.clone() }; | 53 | let src = hir::InFile { file_id: position.file_id.into(), value: def.clone() }; |
54 | hir::Union::from_source(db, src)?.ty(db) | 54 | hir::Union::from_source(db, src)?.ty(db) |
55 | } | 55 | } |
56 | }; | 56 | }; |
@@ -73,7 +73,7 @@ fn impls_for_trait( | |||
73 | node: &ast::TraitDef, | 73 | node: &ast::TraitDef, |
74 | module: hir::Module, | 74 | module: hir::Module, |
75 | ) -> Option<Vec<NavigationTarget>> { | 75 | ) -> Option<Vec<NavigationTarget>> { |
76 | let src = hir::Source { file_id: position.file_id.into(), value: node.clone() }; | 76 | let src = hir::InFile { file_id: position.file_id.into(), value: node.clone() }; |
77 | let tr = hir::Trait::from_source(db, src)?; | 77 | let tr = hir::Trait::from_source(db, src)?; |
78 | 78 | ||
79 | let krate = module.krate(); | 79 | let krate = module.krate(); |