Fix an incorrect comment.
If a `\x` escape occurs in a non-byte literals (e.g. char literal, string literal), it must be <= 0xff.
This commit is contained in:
parent
f3fafbb006
commit
c91c64708b
1 changed files with 1 additions and 1 deletions
|
@ -184,7 +184,7 @@ fn scan_escape(chars: &mut Chars<'_>, mode: Mode) -> Result<char, EscapeError> {
|
|||
|
||||
let value = hi * 16 + lo;
|
||||
|
||||
// For a byte literal verify that it is within ASCII range.
|
||||
// For a non-byte literal verify that it is within ASCII range.
|
||||
if !mode.is_bytes() && !is_ascii(value) {
|
||||
return Err(EscapeError::OutOfRangeHexEscape);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue