aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ssr/src/matching.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ssr/src/matching.rs')
-rw-r--r--crates/ra_ssr/src/matching.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ssr/src/matching.rs b/crates/ra_ssr/src/matching.rs
index 005569f6f..a43d57c34 100644
--- a/crates/ra_ssr/src/matching.rs
+++ b/crates/ra_ssr/src/matching.rs
@@ -576,8 +576,8 @@ mod tests {
576 let rule: SsrRule = "foo($x) ==>> bar($x)".parse().unwrap(); 576 let rule: SsrRule = "foo($x) ==>> bar($x)".parse().unwrap();
577 let input = "fn foo() {} fn bar() {} fn main() { foo(1+2); }"; 577 let input = "fn foo() {} fn bar() {} fn main() { foo(1+2); }";
578 578
579 let (db, _) = crate::tests::single_file(input); 579 let (db, position) = crate::tests::single_file(input);
580 let mut match_finder = MatchFinder::new(&db); 580 let mut match_finder = MatchFinder::in_context(&db, position);
581 match_finder.add_rule(rule); 581 match_finder.add_rule(rule);
582 let matches = match_finder.matches(); 582 let matches = match_finder.matches();
583 assert_eq!(matches.matches.len(), 1); 583 assert_eq!(matches.matches.len(), 1);