aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/syntax_error.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-24 22:40:41 +0100
committerAleksey Kladov <[email protected]>2020-04-25 10:59:18 +0100
commitb1d5817dd18b7b5fc102a63b084b1ee7ff4f9996 (patch)
treee5d136c5ba4a6ba96aeeb423e6e3f64ca7cea3f9 /crates/ra_syntax/src/syntax_error.rs
parent27a7718880d93f55f905da606d108d3b3c682ab4 (diff)
Convert code to text-size
Diffstat (limited to 'crates/ra_syntax/src/syntax_error.rs')
-rw-r--r--crates/ra_syntax/src/syntax_error.rs6
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
3use std::fmt; 3use std::fmt;
4 4
5use crate::{TextRange, TextUnit}; 5use 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 {