diff options
Diffstat (limited to 'crates/ra_syntax/src/parsing')
-rw-r--r-- | crates/ra_syntax/src/parsing/reparsing.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/parsing/reparsing.rs b/crates/ra_syntax/src/parsing/reparsing.rs index dc913cf2b..cf27a3393 100644 --- a/crates/ra_syntax/src/parsing/reparsing.rs +++ b/crates/ra_syntax/src/parsing/reparsing.rs | |||
@@ -178,12 +178,12 @@ mod tests { | |||
178 | let edit = AtomTextEdit::replace(range, replace_with.to_owned()); | 178 | let edit = AtomTextEdit::replace(range, replace_with.to_owned()); |
179 | let after = edit.apply(before.clone()); | 179 | let after = edit.apply(before.clone()); |
180 | 180 | ||
181 | let fully_reparsed = SourceFile::parse2(&after); | 181 | let fully_reparsed = SourceFile::parse(&after); |
182 | let incrementally_reparsed = { | 182 | let incrementally_reparsed = { |
183 | let f = SourceFile::parse(&before); | 183 | let f = SourceFile::parse(&before); |
184 | let edit = AtomTextEdit { delete: range, insert: replace_with.to_string() }; | 184 | let edit = AtomTextEdit { delete: range, insert: replace_with.to_string() }; |
185 | let (green, new_errors, range) = | 185 | let (green, new_errors, range) = |
186 | incremental_reparse(f.syntax(), &edit, f.errors()).unwrap(); | 186 | incremental_reparse(f.tree.syntax(), &edit, f.errors.to_vec()).unwrap(); |
187 | assert_eq!(range.len(), reparsed_len.into(), "reparsed fragment has wrong length"); | 187 | assert_eq!(range.len(), reparsed_len.into(), "reparsed fragment has wrong length"); |
188 | Parse { tree: SourceFile::new(green), errors: Arc::new(new_errors) } | 188 | Parse { tree: SourceFile::new(green), errors: Arc::new(new_errors) } |
189 | }; | 189 | }; |