aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/lib.rs2
-rw-r--r--crates/ra_hir/src/source_binder.rs12
2 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs
index 8702c6222..3ca810a8b 100644
--- a/crates/ra_hir/src/lib.rs
+++ b/crates/ra_hir/src/lib.rs
@@ -66,7 +66,7 @@ pub use self::{
66 adt::AdtDef, 66 adt::AdtDef,
67 expr::{ExprScopes, ScopesWithSourceMap, ScopeEntryWithSyntax}, 67 expr::{ExprScopes, ScopesWithSourceMap, ScopeEntryWithSyntax},
68 resolve::{Resolver, Resolution}, 68 resolve::{Resolver, Resolution},
69 source_binder::{SourceAnalyser, PathResolution}, 69 source_binder::{SourceAnalyzer, PathResolution},
70}; 70};
71 71
72pub use self::code_model_api::{ 72pub use self::code_model_api::{
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 79e304383..309e33ca9 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -261,9 +261,9 @@ fn try_get_resolver_for_node(
261 } 261 }
262} 262}
263 263
264// Name is bad, don't use inside HIR 264/// `SourceAnalyzer`
265#[derive(Debug)] 265#[derive(Debug)]
266pub struct SourceAnalyser { 266pub struct SourceAnalyzer {
267 resolver: Resolver, 267 resolver: Resolver,
268 body_source_map: Option<Arc<crate::expr::BodySourceMap>>, 268 body_source_map: Option<Arc<crate::expr::BodySourceMap>>,
269 infer: Option<Arc<crate::ty::InferenceResult>>, 269 infer: Option<Arc<crate::ty::InferenceResult>>,
@@ -281,18 +281,18 @@ pub enum PathResolution {
281 AssocItem(crate::ImplItem), 281 AssocItem(crate::ImplItem),
282} 282}
283 283
284impl SourceAnalyser { 284impl SourceAnalyzer {
285 pub fn new(db: &impl HirDatabase, file_id: FileId, node: &SyntaxNode) -> SourceAnalyser { 285 pub fn new(db: &impl HirDatabase, file_id: FileId, node: &SyntaxNode) -> SourceAnalyzer {
286 let resolver = resolver_for_node(db, file_id, node); 286 let resolver = resolver_for_node(db, file_id, node);
287 let function = function_from_child_node(db, file_id, node); 287 let function = function_from_child_node(db, file_id, node);
288 if let Some(function) = function { 288 if let Some(function) = function {
289 SourceAnalyser { 289 SourceAnalyzer {
290 resolver, 290 resolver,
291 body_source_map: Some(function.body_source_map(db)), 291 body_source_map: Some(function.body_source_map(db)),
292 infer: Some(function.infer(db)), 292 infer: Some(function.infer(db)),
293 } 293 }
294 } else { 294 } else {
295 SourceAnalyser { resolver, body_source_map: None, infer: None } 295 SourceAnalyzer { resolver, body_source_map: None, infer: None }
296 } 296 }
297 } 297 }
298 298