diff options
Diffstat (limited to 'crates/ra_syntax/src/parsing/reparsing.rs')
-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 2d65b91f1..ffff0a7b2 100644 --- a/crates/ra_syntax/src/parsing/reparsing.rs +++ b/crates/ra_syntax/src/parsing/reparsing.rs | |||
@@ -19,7 +19,7 @@ use crate::{ | |||
19 | syntax_node::{GreenNode, GreenToken, NodeOrToken, SyntaxElement, SyntaxNode}, | 19 | syntax_node::{GreenNode, GreenToken, NodeOrToken, SyntaxElement, SyntaxNode}, |
20 | SyntaxError, | 20 | SyntaxError, |
21 | SyntaxKind::*, | 21 | SyntaxKind::*, |
22 | TextRange, TextUnit, T, | 22 | TextRange, TextSize, T, |
23 | }; | 23 | }; |
24 | 24 | ||
25 | pub(crate) fn incremental_reparse( | 25 | pub(crate) fn incremental_reparse( |
@@ -176,7 +176,7 @@ fn merge_errors( | |||
176 | if old_err_range.end() <= range_before_reparse.start() { | 176 | if old_err_range.end() <= range_before_reparse.start() { |
177 | res.push(old_err); | 177 | res.push(old_err); |
178 | } else if old_err_range.start() >= range_before_reparse.end() { | 178 | } else if old_err_range.start() >= range_before_reparse.end() { |
179 | let inserted_len = TextUnit::of_str(&edit.insert); | 179 | let inserted_len = TextSize::of(&edit.insert); |
180 | res.push(old_err.with_range((old_err_range + inserted_len) - edit.delete.len())); | 180 | res.push(old_err.with_range((old_err_range + inserted_len) - edit.delete.len())); |
181 | // Note: extra parens are intentional to prevent uint underflow, HWAB (here was a bug) | 181 | // Note: extra parens are intentional to prevent uint underflow, HWAB (here was a bug) |
182 | } | 182 | } |