aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-04-13 09:21:32 +0100
committerAleksey Kladov <[email protected]>2019-04-13 09:21:32 +0100
commitd387bdccba2b5bb681e5b6c84cc1b0efe5c1a79a (patch)
treeb9bff845c953d78b3130b13f1c78df948a84198d /crates/ra_hir
parent4f8dc1b9f0fd544b0565dc95bb3f14478aa467bf (diff)
drop obsolete fixme
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/expr/scope.rs1
-rw-r--r--crates/ra_hir/src/source_binder.rs8
2 files changed, 4 insertions, 5 deletions
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 {
37} 37}
38 38
39impl ExprScopes { 39impl ExprScopes {
40 // FIXME: This should take something more general than Function
41 pub(crate) fn expr_scopes_query(db: &impl HirDatabase, def: DefWithBody) -> Arc<ExprScopes> { 40 pub(crate) fn expr_scopes_query(db: &impl HirDatabase, def: DefWithBody) -> Arc<ExprScopes> {
42 let body = db.body_hir(def); 41 let body = db.body_hir(def);
43 let res = ExprScopes::new(body); 42 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 {
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()));