aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_db/src/fixture.rs4
-rw-r--r--crates/ra_hir_def/src/nameres/tests/incremental.rs16
2 files changed, 10 insertions, 10 deletions
diff --git a/crates/ra_db/src/fixture.rs b/crates/ra_db/src/fixture.rs
index 3464f43df..5e3e9203c 100644
--- a/crates/ra_db/src/fixture.rs
+++ b/crates/ra_db/src/fixture.rs
@@ -28,9 +28,9 @@ pub trait WithFixture: Default + SourceDatabaseExt + 'static {
28 db 28 db
29 } 29 }
30 30
31 fn with_position(fixture: &str) -> (Self, FilePosition) { 31 fn with_position(ra_fixture: &str) -> (Self, FilePosition) {
32 let mut db = Self::default(); 32 let mut db = Self::default();
33 let pos = with_files(&mut db, fixture); 33 let pos = with_files(&mut db, ra_fixture);
34 (db, pos.unwrap()) 34 (db, pos.unwrap())
35 } 35 }
36 36
diff --git a/crates/ra_hir_def/src/nameres/tests/incremental.rs b/crates/ra_hir_def/src/nameres/tests/incremental.rs
index 83f429c29..496fc6b08 100644
--- a/crates/ra_hir_def/src/nameres/tests/incremental.rs
+++ b/crates/ra_hir_def/src/nameres/tests/incremental.rs
@@ -4,8 +4,8 @@ use ra_db::SourceDatabaseExt;
4 4
5use super::*; 5use super::*;
6 6
7fn check_def_map_is_not_recomputed(initial: &str, file_change: &str) { 7fn check_def_map_is_not_recomputed(ra_fixture_initial: &str, ra_fixture_change: &str) {
8 let (mut db, pos) = TestDB::with_position(initial); 8 let (mut db, pos) = TestDB::with_position(ra_fixture_initial);
9 let krate = db.test_crate(); 9 let krate = db.test_crate();
10 { 10 {
11 let events = db.log_executed(|| { 11 let events = db.log_executed(|| {
@@ -13,7 +13,7 @@ fn check_def_map_is_not_recomputed(initial: &str, file_change: &str) {
13 }); 13 });
14 assert!(format!("{:?}", events).contains("crate_def_map"), "{:#?}", events) 14 assert!(format!("{:?}", events).contains("crate_def_map"), "{:#?}", events)
15 } 15 }
16 db.set_file_text(pos.file_id, Arc::new(file_change.to_string())); 16 db.set_file_text(pos.file_id, Arc::new(ra_fixture_change.to_string()));
17 17
18 { 18 {
19 let events = db.log_executed(|| { 19 let events = db.log_executed(|| {
@@ -26,7 +26,7 @@ fn check_def_map_is_not_recomputed(initial: &str, file_change: &str) {
26#[test] 26#[test]
27fn typing_inside_a_function_should_not_invalidate_def_map() { 27fn typing_inside_a_function_should_not_invalidate_def_map() {
28 check_def_map_is_not_recomputed( 28 check_def_map_is_not_recomputed(
29 " 29 r"
30 //- /lib.rs 30 //- /lib.rs
31 mod foo;<|> 31 mod foo;<|>
32 32
@@ -41,7 +41,7 @@ fn typing_inside_a_function_should_not_invalidate_def_map() {
41 //- /foo/bar.rs 41 //- /foo/bar.rs
42 pub struct Baz; 42 pub struct Baz;
43 ", 43 ",
44 " 44 r"
45 mod foo; 45 mod foo;
46 46
47 use crate::foo::bar::Baz; 47 use crate::foo::bar::Baz;
@@ -54,7 +54,7 @@ fn typing_inside_a_function_should_not_invalidate_def_map() {
54#[test] 54#[test]
55fn adding_inner_items_should_not_invalidate_def_map() { 55fn adding_inner_items_should_not_invalidate_def_map() {
56 check_def_map_is_not_recomputed( 56 check_def_map_is_not_recomputed(
57 " 57 r"
58 //- /lib.rs 58 //- /lib.rs
59 struct S { a: i32} 59 struct S { a: i32}
60 enum E { A } 60 enum E { A }
@@ -72,7 +72,7 @@ fn adding_inner_items_should_not_invalidate_def_map() {
72 //- /foo/bar.rs 72 //- /foo/bar.rs
73 pub struct Baz; 73 pub struct Baz;
74 ", 74 ",
75 " 75 r"
76 struct S { a: i32, b: () } 76 struct S { a: i32, b: () }
77 enum E { A, B } 77 enum E { A, B }
78 trait T { 78 trait T {
@@ -92,7 +92,7 @@ fn adding_inner_items_should_not_invalidate_def_map() {
92#[test] 92#[test]
93fn typing_inside_a_macro_should_not_invalidate_def_map() { 93fn typing_inside_a_macro_should_not_invalidate_def_map() {
94 let (mut db, pos) = TestDB::with_position( 94 let (mut db, pos) = TestDB::with_position(
95 " 95 r"
96 //- /lib.rs 96 //- /lib.rs
97 macro_rules! m { 97 macro_rules! m {
98 ($ident:ident) => { 98 ($ident:ident) => {