Adjust Mode::is_unicode_escape_disallowed.

Some cases are unreachable.
This commit is contained in:
Nicholas Nethercote 2023-12-13 09:29:59 +11:00
parent 423bf4233d
commit 29c5158ef5

View file

@ -191,8 +191,9 @@ impl Mode {
/// Byte literals do not allow unicode escape.
fn is_unicode_escape_disallowed(self) -> bool {
match self {
Byte | ByteStr | RawByteStr => true,
Char | Str | RawStr | CStr | RawCStr => false,
Byte | ByteStr => true,
Char | Str | CStr => false,
RawByteStr | RawStr | RawCStr => unreachable!(),
}
}