diff options
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index b5e2f86be..a50287339 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -250,10 +250,6 @@ impl SourceAnalyzer { | |||
250 | self.resolver.resolve_path(db, path) | 250 | self.resolver.resolve_path(db, path) |
251 | } | 251 | } |
252 | 252 | ||
253 | pub fn all_names(&self, db: &impl HirDatabase) -> FxHashMap<Name, PerNs<crate::Resolution>> { | ||
254 | self.resolver.all_names(db) | ||
255 | } | ||
256 | |||
257 | pub fn resolve_path(&self, db: &impl HirDatabase, path: &ast::Path) -> Option<PathResolution> { | 253 | pub fn resolve_path(&self, db: &impl HirDatabase, path: &ast::Path) -> Option<PathResolution> { |
258 | if let Some(path_expr) = path.syntax().parent().and_then(ast::PathExpr::cast) { | 254 | if let Some(path_expr) = path.syntax().parent().and_then(ast::PathExpr::cast) { |
259 | let expr_id = self.body_source_map.as_ref()?.node_expr(path_expr.into())?; | 255 | let expr_id = self.body_source_map.as_ref()?.node_expr(path_expr.into())?; |
@@ -301,6 +297,10 @@ impl SourceAnalyzer { | |||
301 | }) | 297 | }) |
302 | } | 298 | } |
303 | 299 | ||
300 | pub fn all_names(&self, db: &impl HirDatabase) -> FxHashMap<Name, PerNs<crate::Resolution>> { | ||
301 | self.resolver.all_names(db) | ||
302 | } | ||
303 | |||
304 | pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> { | 304 | pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> { |
305 | let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap(); | 305 | let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap(); |
306 | let ptr = Either::A(AstPtr::new(pat.into())); | 306 | let ptr = Either::A(AstPtr::new(pat.into())); |