drop obsolete fixme
This commit is contained in:
@@ -37,7 +37,6 @@ pub(crate) struct ScopeData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl ExprScopes {
|
impl ExprScopes {
|
||||||
// FIXME: This should take something more general than Function
|
|
||||||
pub(crate) fn expr_scopes_query(db: &impl HirDatabase, def: DefWithBody) -> Arc<ExprScopes> {
|
pub(crate) fn expr_scopes_query(db: &impl HirDatabase, def: DefWithBody) -> Arc<ExprScopes> {
|
||||||
let body = db.body_hir(def);
|
let body = db.body_hir(def);
|
||||||
let res = ExprScopes::new(body);
|
let res = ExprScopes::new(body);
|
||||||
|
|||||||
@@ -250,10 +250,6 @@ impl SourceAnalyzer {
|
|||||||
self.resolver.resolve_path(db, path)
|
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> {
|
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) {
|
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())?;
|
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> {
|
pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> {
|
||||||
let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap();
|
let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap();
|
||||||
let ptr = Either::A(AstPtr::new(pat.into()));
|
let ptr = Either::A(AstPtr::new(pat.into()));
|
||||||
|
|||||||
Reference in New Issue
Block a user