diff --git a/compiler/rustc_lexer/src/unescape.rs b/compiler/rustc_lexer/src/unescape.rs index d98a702427e..ddbe826f570 100644 --- a/compiler/rustc_lexer/src/unescape.rs +++ b/compiler/rustc_lexer/src/unescape.rs @@ -169,8 +169,9 @@ pub fn in_double_quotes(self) -> bool { /// Non-byte literals should have `\xXX` escapes that are within the ASCII range. fn ascii_escapes_should_be_ascii(self) -> bool { match self { - Mode::Char | Mode::Str | Mode::RawStr => true, - Mode::Byte | Mode::ByteStr | Mode::RawByteStr | Mode::CStr | Mode::RawCStr => false, + Mode::Char | Mode::Str => true, + Mode::Byte | Mode::ByteStr | Mode::CStr => false, + Mode::RawStr | Mode::RawByteStr | Mode::RawCStr => unreachable!(), } }