diff options
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 38d66c2a7..dddac915b 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -30,7 +30,7 @@ use crate::{ | |||
30 | db::{DefDatabase, HirDatabase}, | 30 | db::{DefDatabase, HirDatabase}, |
31 | ty::display::HirFormatter, | 31 | ty::display::HirFormatter, |
32 | ty::{self, InEnvironment, InferenceResult, TraitEnvironment, Ty, TyDefId, TypeCtor, TypeWalk}, | 32 | ty::{self, InEnvironment, InferenceResult, TraitEnvironment, Ty, TyDefId, TypeCtor, TypeWalk}, |
33 | CallableDef, Either, HirDisplay, Name, Source, | 33 | CallableDef, Either, HirDisplay, InFile, Name, |
34 | }; | 34 | }; |
35 | 35 | ||
36 | /// hir::Crate describes a single crate. It's the main interface with which | 36 | /// hir::Crate describes a single crate. It's the main interface with which |
@@ -118,7 +118,7 @@ impl ModuleSource { | |||
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | pub fn from_child_node(db: &impl DefDatabase, child: Source<&SyntaxNode>) -> ModuleSource { | 121 | pub fn from_child_node(db: &impl DefDatabase, child: InFile<&SyntaxNode>) -> ModuleSource { |
122 | if let Some(m) = | 122 | if let Some(m) = |
123 | child.value.ancestors().filter_map(ast::Module::cast).find(|it| !it.has_semi()) | 123 | child.value.ancestors().filter_map(ast::Module::cast).find(|it| !it.has_semi()) |
124 | { | 124 | { |
@@ -901,7 +901,7 @@ impl Local { | |||
901 | Type { krate, ty: InEnvironment { value: ty, environment } } | 901 | Type { krate, ty: InEnvironment { value: ty, environment } } |
902 | } | 902 | } |
903 | 903 | ||
904 | pub fn source(self, db: &impl HirDatabase) -> Source<Either<ast::BindPat, ast::SelfParam>> { | 904 | pub fn source(self, db: &impl HirDatabase) -> InFile<Either<ast::BindPat, ast::SelfParam>> { |
905 | let (_body, source_map) = db.body_with_source_map(self.parent.into()); | 905 | let (_body, source_map) = db.body_with_source_map(self.parent.into()); |
906 | let src = source_map.pat_syntax(self.pat_id).unwrap(); // Hmm... | 906 | let src = source_map.pat_syntax(self.pat_id).unwrap(); // Hmm... |
907 | let root = src.file_syntax(db); | 907 | let root = src.file_syntax(db); |