Mark incorrect recovered char
literals as TyErr
to avoid type errors
This commit is contained in:
parent
e9af312932
commit
a4ff1dcc53
9 changed files with 26 additions and 4 deletions
|
@ -466,7 +466,7 @@ crate fn lit_token(lit: token::Lit, suf: Option<Symbol>, diag: Option<(Span, &Ha
|
|||
match lit {
|
||||
token::Byte(i) => (true, Some(LitKind::Byte(byte_lit(&i.as_str()).0))),
|
||||
token::Char(i) => (true, Some(LitKind::Char(char_lit(&i.as_str(), diag).0))),
|
||||
token::Err(i) => (true, Some(LitKind::Char(char_lit(&i.as_str(), diag).0))),
|
||||
token::Err(i) => (true, Some(LitKind::Err(i))),
|
||||
|
||||
// There are some valid suffixes for integer and float literals,
|
||||
// so all the handling is done internally.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue