aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/validation/byte.rs5
-rw-r--r--crates/ra_syntax/src/validation/byte_string.rs5
-rw-r--r--crates/ra_syntax/src/validation/char.rs5
-rw-r--r--crates/ra_syntax/src/validation/string.rs5
4 files changed, 16 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/validation/byte.rs b/crates/ra_syntax/src/validation/byte.rs
index 2f9b7fac7..d0897eeed 100644
--- a/crates/ra_syntax/src/validation/byte.rs
+++ b/crates/ra_syntax/src/validation/byte.rs
@@ -28,7 +28,10 @@ pub(super) fn validate_byte_node(node: ast::Byte, errors: &mut Vec<SyntaxError>)
28 } 28 }
29 29
30 if let Some(range) = components.suffix { 30 if let Some(range) = components.suffix {
31 errors.push(SyntaxError::new(InvalidSuffix, range)); 31 errors.push(SyntaxError::new(
32 InvalidSuffix,
33 range + literal_range.start(),
34 ));
32 } 35 }
33 36
34 if len == 0 { 37 if len == 0 {
diff --git a/crates/ra_syntax/src/validation/byte_string.rs b/crates/ra_syntax/src/validation/byte_string.rs
index bf4c934a7..f7a4fb156 100644
--- a/crates/ra_syntax/src/validation/byte_string.rs
+++ b/crates/ra_syntax/src/validation/byte_string.rs
@@ -34,7 +34,10 @@ pub(crate) fn validate_byte_string_node(node: ast::ByteString, errors: &mut Vec<
34 } 34 }
35 35
36 if let Some(range) = components.suffix { 36 if let Some(range) = components.suffix {
37 errors.push(SyntaxError::new(InvalidSuffix, range)); 37 errors.push(SyntaxError::new(
38 InvalidSuffix,
39 range + literal_range.start(),
40 ));
38 } 41 }
39} 42}
40 43
diff --git a/crates/ra_syntax/src/validation/char.rs b/crates/ra_syntax/src/validation/char.rs
index 50184aaf8..19cd3830f 100644
--- a/crates/ra_syntax/src/validation/char.rs
+++ b/crates/ra_syntax/src/validation/char.rs
@@ -31,7 +31,10 @@ pub(super) fn validate_char_node(node: ast::Char, errors: &mut Vec<SyntaxError>)
31 } 31 }
32 32
33 if let Some(range) = components.suffix { 33 if let Some(range) = components.suffix {
34 errors.push(SyntaxError::new(InvalidSuffix, range)); 34 errors.push(SyntaxError::new(
35 InvalidSuffix,
36 range + literal_range.start(),
37 ));
35 } 38 }
36 39
37 if len == 0 { 40 if len == 0 {
diff --git a/crates/ra_syntax/src/validation/string.rs b/crates/ra_syntax/src/validation/string.rs
index ff1fb6edc..1371bb1f0 100644
--- a/crates/ra_syntax/src/validation/string.rs
+++ b/crates/ra_syntax/src/validation/string.rs
@@ -29,7 +29,10 @@ pub(crate) fn validate_string_node(node: ast::String, errors: &mut Vec<SyntaxErr
29 } 29 }
30 30
31 if let Some(range) = components.suffix { 31 if let Some(range) = components.suffix {
32 errors.push(SyntaxError::new(InvalidSuffix, range)); 32 errors.push(SyntaxError::new(
33 InvalidSuffix,
34 range + literal_range.start(),
35 ));
33 } 36 }
34} 37}
35 38