aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ssr/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ssr/src/lib.rs')
-rw-r--r--crates/ra_ssr/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ssr/src/lib.rs b/crates/ra_ssr/src/lib.rs
index fb53212a3..6725582e4 100644
--- a/crates/ra_ssr/src/lib.rs
+++ b/crates/ra_ssr/src/lib.rs
@@ -18,8 +18,8 @@ use crate::errors::bail;
18pub use crate::errors::SsrError; 18pub use crate::errors::SsrError;
19pub use crate::matching::Match; 19pub use crate::matching::Match;
20use crate::matching::MatchFailureReason; 20use crate::matching::MatchFailureReason;
21use base_db::{FileId, FilePosition, FileRange};
21use hir::Semantics; 22use hir::Semantics;
22use ra_db::{FileId, FilePosition, FileRange};
23use ra_ide_db::source_change::SourceFileEdit; 23use ra_ide_db::source_change::SourceFileEdit;
24use resolving::ResolvedRule; 24use resolving::ResolvedRule;
25use rustc_hash::FxHashMap; 25use rustc_hash::FxHashMap;
@@ -71,7 +71,7 @@ impl<'db> MatchFinder<'db> {
71 71
72 /// Constructs an instance using the start of the first file in `db` as the lookup context. 72 /// Constructs an instance using the start of the first file in `db` as the lookup context.
73 pub fn at_first_file(db: &'db ra_ide_db::RootDatabase) -> Result<MatchFinder<'db>, SsrError> { 73 pub fn at_first_file(db: &'db ra_ide_db::RootDatabase) -> Result<MatchFinder<'db>, SsrError> {
74 use ra_db::SourceDatabaseExt; 74 use base_db::SourceDatabaseExt;
75 use ra_ide_db::symbol_index::SymbolsDatabase; 75 use ra_ide_db::symbol_index::SymbolsDatabase;
76 if let Some(first_file_id) = db 76 if let Some(first_file_id) = db
77 .local_roots() 77 .local_roots()
@@ -105,7 +105,7 @@ impl<'db> MatchFinder<'db> {
105 105
106 /// Finds matches for all added rules and returns edits for all found matches. 106 /// Finds matches for all added rules and returns edits for all found matches.
107 pub fn edits(&self) -> Vec<SourceFileEdit> { 107 pub fn edits(&self) -> Vec<SourceFileEdit> {
108 use ra_db::SourceDatabaseExt; 108 use base_db::SourceDatabaseExt;
109 let mut matches_by_file = FxHashMap::default(); 109 let mut matches_by_file = FxHashMap::default();
110 for m in self.matches().matches { 110 for m in self.matches().matches {
111 matches_by_file 111 matches_by_file
@@ -150,7 +150,7 @@ impl<'db> MatchFinder<'db> {
150 /// them, while recording reasons why they don't match. This API is useful for command 150 /// them, while recording reasons why they don't match. This API is useful for command
151 /// line-based debugging where providing a range is difficult. 151 /// line-based debugging where providing a range is difficult.
152 pub fn debug_where_text_equal(&self, file_id: FileId, snippet: &str) -> Vec<MatchDebugInfo> { 152 pub fn debug_where_text_equal(&self, file_id: FileId, snippet: &str) -> Vec<MatchDebugInfo> {
153 use ra_db::SourceDatabaseExt; 153 use base_db::SourceDatabaseExt;
154 let file = self.sema.parse(file_id); 154 let file = self.sema.parse(file_id);
155 let mut res = Vec::new(); 155 let mut res = Vec::new();
156 let file_text = self.sema.db.file_text(file_id); 156 let file_text = self.sema.db.file_text(file_id);