fix: use unescape_byte function for Byte literals

This commit is contained in:
Pol Valletbó 2023-10-11 13:09:12 +02:00
parent f58a8250dc
commit 677e6f3439
3 changed files with 12 additions and 21 deletions

View file

@ -274,7 +274,7 @@ impl<'a> Converter<'a> {
let text = &self.res.text[self.offset + 2..][..len - 2];
let i = text.rfind('\'').unwrap();
let text = &text[..i];
if let Err(e) = rustc_lexer::unescape::unescape_char(text) {
if let Err(e) = rustc_lexer::unescape::unescape_byte(text) {
err = error_to_diagnostic_message(e, Mode::Byte);
}
}