Skip to content

Commit 29c5158

Browse files
committed
Adjust Mode::is_unicode_escape_disallowed.
Some cases are unreachable.
1 parent 423bf42 commit 29c5158

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/rustc_lexer/src/unescape.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,9 @@ impl Mode {
191191
/// Byte literals do not allow unicode escape.
192192
fn is_unicode_escape_disallowed(self) -> bool {
193193
match self {
194-
Byte | ByteStr | RawByteStr => true,
195-
Char | Str | RawStr | CStr | RawCStr => false,
194+
Byte | ByteStr => true,
195+
Char | Str | CStr => false,
196+
RawByteStr | RawStr | RawCStr => unreachable!(),
196197
}
197198
}
198199

0 commit comments

Comments
 (0)