aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ssr/src/matching.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-13 15:39:16 +0100
committerAleksey Kladov <[email protected]>2020-08-13 15:39:16 +0100
commitbb5c189b7dae1ea63ccd5d7a0c2e097d7c676f77 (patch)
tree62db93464dbd9ea154a8cb579a576202d97c01cc /crates/ra_ssr/src/matching.rs
parentae71a631fd657368e8593feb5e025d23147afe60 (diff)
Rename ra_ide_db -> ide_db
Diffstat (limited to 'crates/ra_ssr/src/matching.rs')
-rw-r--r--crates/ra_ssr/src/matching.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ssr/src/matching.rs b/crates/ra_ssr/src/matching.rs
index e81a87c47..ffc7202ae 100644
--- a/crates/ra_ssr/src/matching.rs
+++ b/crates/ra_ssr/src/matching.rs
@@ -92,7 +92,7 @@ pub(crate) fn get_match(
92 rule: &ResolvedRule, 92 rule: &ResolvedRule,
93 code: &SyntaxNode, 93 code: &SyntaxNode,
94 restrict_range: &Option<FileRange>, 94 restrict_range: &Option<FileRange>,
95 sema: &Semantics<ra_ide_db::RootDatabase>, 95 sema: &Semantics<ide_db::RootDatabase>,
96) -> Result<Match, MatchFailed> { 96) -> Result<Match, MatchFailed> {
97 record_match_fails_reasons_scope(debug_active, || { 97 record_match_fails_reasons_scope(debug_active, || {
98 Matcher::try_match(rule, code, restrict_range, sema) 98 Matcher::try_match(rule, code, restrict_range, sema)
@@ -101,7 +101,7 @@ pub(crate) fn get_match(
101 101
102/// Checks if our search pattern matches a particular node of the AST. 102/// Checks if our search pattern matches a particular node of the AST.
103struct Matcher<'db, 'sema> { 103struct Matcher<'db, 'sema> {
104 sema: &'sema Semantics<'db, ra_ide_db::RootDatabase>, 104 sema: &'sema Semantics<'db, ide_db::RootDatabase>,
105 /// If any placeholders come from anywhere outside of this range, then the match will be 105 /// If any placeholders come from anywhere outside of this range, then the match will be
106 /// rejected. 106 /// rejected.
107 restrict_range: Option<FileRange>, 107 restrict_range: Option<FileRange>,
@@ -123,7 +123,7 @@ impl<'db, 'sema> Matcher<'db, 'sema> {
123 rule: &ResolvedRule, 123 rule: &ResolvedRule,
124 code: &SyntaxNode, 124 code: &SyntaxNode,
125 restrict_range: &Option<FileRange>, 125 restrict_range: &Option<FileRange>,
126 sema: &'sema Semantics<'db, ra_ide_db::RootDatabase>, 126 sema: &'sema Semantics<'db, ide_db::RootDatabase>,
127 ) -> Result<Match, MatchFailed> { 127 ) -> Result<Match, MatchFailed> {
128 let match_state = Matcher { sema, restrict_range: restrict_range.clone(), rule }; 128 let match_state = Matcher { sema, restrict_range: restrict_range.clone(), rule };
129 // First pass at matching, where we check that node types and idents match. 129 // First pass at matching, where we check that node types and idents match.
@@ -606,7 +606,7 @@ impl Match {
606 fn render_template_paths( 606 fn render_template_paths(
607 &mut self, 607 &mut self,
608 template: &ResolvedPattern, 608 template: &ResolvedPattern,
609 sema: &Semantics<ra_ide_db::RootDatabase>, 609 sema: &Semantics<ide_db::RootDatabase>,
610 ) -> Result<(), MatchFailed> { 610 ) -> Result<(), MatchFailed> {
611 let module = sema 611 let module = sema
612 .scope(&self.matched_node) 612 .scope(&self.matched_node)