mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
fix: use unescape_byte function for Byte literals
This commit is contained in:
parent
f58a8250dc
commit
677e6f3439
3 changed files with 12 additions and 21 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue