From d387bdccba2b5bb681e5b6c84cc1b0efe5c1a79a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 13 Apr 2019 11:21:32 +0300 Subject: drop obsolete fixme --- crates/ra_hir/src/expr/scope.rs | 1 - crates/ra_hir/src/source_binder.rs | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'crates/ra_hir') diff --git a/crates/ra_hir/src/expr/scope.rs b/crates/ra_hir/src/expr/scope.rs index 4ac797eb7..6a6de5772 100644 --- a/crates/ra_hir/src/expr/scope.rs +++ b/crates/ra_hir/src/expr/scope.rs @@ -37,7 +37,6 @@ pub(crate) struct ScopeData { } impl ExprScopes { - // FIXME: This should take something more general than Function pub(crate) fn expr_scopes_query(db: &impl HirDatabase, def: DefWithBody) -> Arc { let body = db.body_hir(def); let res = ExprScopes::new(body); 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 { self.resolver.resolve_path(db, path) } - pub fn all_names(&self, db: &impl HirDatabase) -> FxHashMap> { - self.resolver.all_names(db) - } - pub fn resolve_path(&self, db: &impl HirDatabase, path: &ast::Path) -> Option { if let Some(path_expr) = path.syntax().parent().and_then(ast::PathExpr::cast) { let expr_id = self.body_source_map.as_ref()?.node_expr(path_expr.into())?; @@ -301,6 +297,10 @@ impl SourceAnalyzer { }) } + pub fn all_names(&self, db: &impl HirDatabase) -> FxHashMap> { + self.resolver.all_names(db) + } + pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec { let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap(); let ptr = Either::A(AstPtr::new(pat.into())); -- cgit v1.2.3