aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/validation
diff options
context:
space:
mode:
authorDJMcNab <[email protected]>2018-12-29 12:40:08 +0000
committerDJMcNab <[email protected]>2018-12-29 12:40:08 +0000
commit054f22f2312b60c8545386dadc712706323945b6 (patch)
tree1836bd501bca3a76e9dea4e114d4db3b13353f6b /crates/ra_syntax/src/validation
parentf3f073804cf768c0b219d89081a26bedfde8ffed (diff)
Fix a fuzzing bug and add Cargo.lock to the fuzzing directory
Diffstat (limited to 'crates/ra_syntax/src/validation')
-rw-r--r--crates/ra_syntax/src/validation/char.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/validation/char.rs b/crates/ra_syntax/src/validation/char.rs
index 19cd3830f..10d3d1dec 100644
--- a/crates/ra_syntax/src/validation/char.rs
+++ b/crates/ra_syntax/src/validation/char.rs
@@ -70,7 +70,7 @@ pub(super) fn validate_char_component(
70 70
71fn validate_ascii_escape(text: &str, range: TextRange, errors: &mut Vec<SyntaxError>) { 71fn validate_ascii_escape(text: &str, range: TextRange, errors: &mut Vec<SyntaxError>) {
72 if text.len() == 1 { 72 if text.len() == 1 {
73 // Escape sequence consists only of leading `\` 73 // Escape sequence consists only of leading `\` (only occurs at EOF, otherwise e.g. '\' is treated as an unclosed char containing a single quote `'`)
74 errors.push(SyntaxError::new(EmptyAsciiEscape, range)); 74 errors.push(SyntaxError::new(EmptyAsciiEscape, range));
75 } else { 75 } else {
76 let escape_code = text.chars().skip(1).next().unwrap(); 76 let escape_code = text.chars().skip(1).next().unwrap();