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.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ssr/src/lib.rs b/crates/ra_ssr/src/lib.rs
index 6725582e4..b4e35107e 100644
--- a/crates/ra_ssr/src/lib.rs
+++ b/crates/ra_ssr/src/lib.rs
@@ -20,7 +20,7 @@ pub use crate::matching::Match;
20use crate::matching::MatchFailureReason; 20use crate::matching::MatchFailureReason;
21use base_db::{FileId, FilePosition, FileRange}; 21use base_db::{FileId, FilePosition, FileRange};
22use hir::Semantics; 22use hir::Semantics;
23use ra_ide_db::source_change::SourceFileEdit; 23use ide_db::source_change::SourceFileEdit;
24use resolving::ResolvedRule; 24use resolving::ResolvedRule;
25use rustc_hash::FxHashMap; 25use rustc_hash::FxHashMap;
26use syntax::{ast, AstNode, SyntaxNode, TextRange}; 26use syntax::{ast, AstNode, SyntaxNode, TextRange};
@@ -49,7 +49,7 @@ pub struct SsrMatches {
49/// Searches a crate for pattern matches and possibly replaces them with something else. 49/// Searches a crate for pattern matches and possibly replaces them with something else.
50pub struct MatchFinder<'db> { 50pub struct MatchFinder<'db> {
51 /// Our source of information about the user's code. 51 /// Our source of information about the user's code.
52 sema: Semantics<'db, ra_ide_db::RootDatabase>, 52 sema: Semantics<'db, ide_db::RootDatabase>,
53 rules: Vec<ResolvedRule>, 53 rules: Vec<ResolvedRule>,
54 resolution_scope: resolving::ResolutionScope<'db>, 54 resolution_scope: resolving::ResolutionScope<'db>,
55 restrict_ranges: Vec<FileRange>, 55 restrict_ranges: Vec<FileRange>,
@@ -59,7 +59,7 @@ impl<'db> MatchFinder<'db> {
59 /// Constructs a new instance where names will be looked up as if they appeared at 59 /// Constructs a new instance where names will be looked up as if they appeared at
60 /// `lookup_context`. 60 /// `lookup_context`.
61 pub fn in_context( 61 pub fn in_context(
62 db: &'db ra_ide_db::RootDatabase, 62 db: &'db ide_db::RootDatabase,
63 lookup_context: FilePosition, 63 lookup_context: FilePosition,
64 mut restrict_ranges: Vec<FileRange>, 64 mut restrict_ranges: Vec<FileRange>,
65 ) -> MatchFinder<'db> { 65 ) -> MatchFinder<'db> {
@@ -70,9 +70,9 @@ impl<'db> MatchFinder<'db> {
70 } 70 }
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 ide_db::RootDatabase) -> Result<MatchFinder<'db>, SsrError> {
74 use base_db::SourceDatabaseExt; 74 use base_db::SourceDatabaseExt;
75 use ra_ide_db::symbol_index::SymbolsDatabase; 75 use 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()
78 .iter() 78 .iter()