diff options
Diffstat (limited to 'crates/ra_syntax/src/syntax_error.rs')
-rw-r--r-- | crates/ra_syntax/src/syntax_error.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/syntax_error.rs b/crates/ra_syntax/src/syntax_error.rs index 54acf7847..7c4511fec 100644 --- a/crates/ra_syntax/src/syntax_error.rs +++ b/crates/ra_syntax/src/syntax_error.rs | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | use std::fmt; | 3 | use std::fmt; |
4 | 4 | ||
5 | use crate::{TextRange, TextUnit}; | 5 | use crate::{TextRange, TextSize}; |
6 | 6 | ||
7 | /// Represents the result of unsuccessful tokenization, parsing | 7 | /// Represents the result of unsuccessful tokenization, parsing |
8 | /// or tree validation. | 8 | /// or tree validation. |
@@ -23,8 +23,8 @@ impl SyntaxError { | |||
23 | pub fn new(message: impl Into<String>, range: TextRange) -> Self { | 23 | pub fn new(message: impl Into<String>, range: TextRange) -> Self { |
24 | Self(message.into(), range) | 24 | Self(message.into(), range) |
25 | } | 25 | } |
26 | pub fn new_at_offset(message: impl Into<String>, offset: TextUnit) -> Self { | 26 | pub fn new_at_offset(message: impl Into<String>, offset: TextSize) -> Self { |
27 | Self(message.into(), TextRange::offset_len(offset, 0.into())) | 27 | Self(message.into(), TextRange::empty(offset)) |
28 | } | 28 | } |
29 | 29 | ||
30 | pub fn range(&self) -> TextRange { | 30 | pub fn range(&self) -> TextRange { |