diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-04 13:26:03 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-04 13:26:03 +0000 |
commit | 1113f73ee270c0001429a6be306e4debb6079e45 (patch) | |
tree | 4f14fda3b2ef64d7fe945a493f4f64c1696ef2cc /crates/ra_hir/src/semantics.rs | |
parent | 94189d0a1c8cf24b155fe7bad9b159bc17e997bb (diff) | |
parent | f57682c0b3b17a09d728c77134200b4151b2358d (diff) |
Merge #3443
3443: Remove old find refs infra r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/semantics.rs')
-rw-r--r-- | crates/ra_hir/src/semantics.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index afc7f7ee7..7ce785791 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs | |||
@@ -19,7 +19,7 @@ use rustc_hash::{FxHashMap, FxHashSet}; | |||
19 | use crate::{ | 19 | use crate::{ |
20 | db::HirDatabase, | 20 | db::HirDatabase, |
21 | semantics::source_to_def::{ChildContainer, SourceToDefCache, SourceToDefCtx}, | 21 | semantics::source_to_def::{ChildContainer, SourceToDefCache, SourceToDefCtx}, |
22 | source_analyzer::{resolve_hir_path, ReferenceDescriptor, SourceAnalyzer}, | 22 | source_analyzer::{resolve_hir_path, SourceAnalyzer}, |
23 | Function, HirFileId, InFile, Local, MacroDef, Module, ModuleDef, Name, Origin, Path, | 23 | Function, HirFileId, InFile, Local, MacroDef, Module, ModuleDef, Name, Origin, Path, |
24 | PathResolution, ScopeDef, StructField, Trait, Type, TypeParam, VariantDef, | 24 | PathResolution, ScopeDef, StructField, Trait, Type, TypeParam, VariantDef, |
25 | }; | 25 | }; |
@@ -171,12 +171,6 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> { | |||
171 | SemanticsScope { db: self.db, resolver } | 171 | SemanticsScope { db: self.db, resolver } |
172 | } | 172 | } |
173 | 173 | ||
174 | // FIXME: we only use this in `inline_local_variable` assist, ideally, we | ||
175 | // should switch to general reference search infra there. | ||
176 | pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> { | ||
177 | self.analyze(pat.syntax()).find_all_refs(pat) | ||
178 | } | ||
179 | |||
180 | fn analyze(&self, node: &SyntaxNode) -> SourceAnalyzer { | 174 | fn analyze(&self, node: &SyntaxNode) -> SourceAnalyzer { |
181 | let src = self.find_file(node.clone()); | 175 | let src = self.find_file(node.clone()); |
182 | self.analyze2(src.as_ref(), None) | 176 | self.analyze2(src.as_ref(), None) |