mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Lower values of char and byte literals
This commit is contained in:
parent
0218aeba7a
commit
9856144b0b
8 changed files with 178 additions and 11 deletions
|
@ -151,12 +151,12 @@ fn validate_literal(literal: ast::Literal, acc: &mut Vec<SyntaxError>) {
|
|||
}
|
||||
}
|
||||
}
|
||||
ast::LiteralKind::Char => {
|
||||
ast::LiteralKind::Char(_) => {
|
||||
if let Some(Err(e)) = unquote(text, 1, '\'').map(unescape_char) {
|
||||
push_err(1, e);
|
||||
}
|
||||
}
|
||||
ast::LiteralKind::Byte => {
|
||||
ast::LiteralKind::Byte(_) => {
|
||||
if let Some(Err(e)) = unquote(text, 2, '\'').map(unescape_byte) {
|
||||
push_err(2, e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue