aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/mock_analysis.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_ide/src/mock_analysis.rs b/crates/ra_ide/src/mock_analysis.rs
index 2c13f206a..64c0684c5 100644
--- a/crates/ra_ide/src/mock_analysis.rs
+++ b/crates/ra_ide/src/mock_analysis.rs
@@ -35,7 +35,7 @@ impl MockAnalysis {
35 pub fn with_files(fixture: &str) -> MockAnalysis { 35 pub fn with_files(fixture: &str) -> MockAnalysis {
36 let mut res = MockAnalysis::new(); 36 let mut res = MockAnalysis::new();
37 for entry in parse_fixture(fixture) { 37 for entry in parse_fixture(fixture) {
38 res.add_file(&entry.meta, &entry.text); 38 res.add_file(entry.meta.path().as_str(), &entry.text);
39 } 39 }
40 res 40 res
41 } 41 }
@@ -48,9 +48,10 @@ impl MockAnalysis {
48 for entry in parse_fixture(fixture) { 48 for entry in parse_fixture(fixture) {
49 if entry.text.contains(CURSOR_MARKER) { 49 if entry.text.contains(CURSOR_MARKER) {
50 assert!(position.is_none(), "only one marker (<|>) per fixture is allowed"); 50 assert!(position.is_none(), "only one marker (<|>) per fixture is allowed");
51 position = Some(res.add_file_with_position(&entry.meta, &entry.text)); 51 position =
52 Some(res.add_file_with_position(&entry.meta.path().as_str(), &entry.text));
52 } else { 53 } else {
53 res.add_file(&entry.meta, &entry.text); 54 res.add_file(&entry.meta.path().as_str(), &entry.text);
54 } 55 }
55 } 56 }
56 let position = position.expect("expected a marker (<|>)"); 57 let position = position.expect("expected a marker (<|>)");