mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Remove old find refs infra
This commit is contained in:
parent
94189d0a1c
commit
f57682c0b3
4 changed files with 23 additions and 54 deletions
|
@ -19,7 +19,7 @@ use rustc_hash::{FxHashMap, FxHashSet};
|
|||
use crate::{
|
||||
db::HirDatabase,
|
||||
semantics::source_to_def::{ChildContainer, SourceToDefCache, SourceToDefCtx},
|
||||
source_analyzer::{resolve_hir_path, ReferenceDescriptor, SourceAnalyzer},
|
||||
source_analyzer::{resolve_hir_path, SourceAnalyzer},
|
||||
Function, HirFileId, InFile, Local, MacroDef, Module, ModuleDef, Name, Origin, Path,
|
||||
PathResolution, ScopeDef, StructField, Trait, Type, TypeParam, VariantDef,
|
||||
};
|
||||
|
@ -171,12 +171,6 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> {
|
|||
SemanticsScope { db: self.db, resolver }
|
||||
}
|
||||
|
||||
// FIXME: we only use this in `inline_local_variable` assist, ideally, we
|
||||
// should switch to general reference search infra there.
|
||||
pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> {
|
||||
self.analyze(pat.syntax()).find_all_refs(pat)
|
||||
}
|
||||
|
||||
fn analyze(&self, node: &SyntaxNode) -> SourceAnalyzer {
|
||||
let src = self.find_file(node.clone());
|
||||
self.analyze2(src.as_ref(), None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue