drop obsolete fixme

This commit is contained in:
Aleksey Kladov 2019-04-13 11:21:32 +03:00
parent 4f8dc1b9f0
commit d387bdccba
2 changed files with 4 additions and 5 deletions

View File

@ -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<ExprScopes> {
let body = db.body_hir(def);
let res = ExprScopes::new(body);

View File

@ -250,10 +250,6 @@ impl SourceAnalyzer {
self.resolver.resolve_path(db, path)
}
pub fn all_names(&self, db: &impl HirDatabase) -> FxHashMap<Name, PerNs<crate::Resolution>> {
self.resolver.all_names(db)
}
pub fn resolve_path(&self, db: &impl HirDatabase, path: &ast::Path) -> Option<PathResolution> {
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<Name, PerNs<crate::Resolution>> {
self.resolver.all_names(db)
}
pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> {
let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap();
let ptr = Either::A(AstPtr::new(pat.into()));