Add ErrorGuaranteed
to ast::LitKind::Err
, token::LitKind::Err
.
This mostly works well, and eliminates a couple of delayed bugs. One annoying thing is that we should really also add an `ErrorGuaranteed` to `proc_macro::bridge::LitKind::Err`. But that's difficult because `proc_macro` doesn't have access to `ErrorGuaranteed`, so we have to fake it.
This commit is contained in:
parent
332c57723a
commit
25ed6e43b0
26 changed files with 85 additions and 64 deletions
|
@ -1459,7 +1459,7 @@ impl<'a> Parser<'a> {
|
|||
match self.parse_str_lit() {
|
||||
Ok(str_lit) => Some(str_lit),
|
||||
Err(Some(lit)) => match lit.kind {
|
||||
ast::LitKind::Err => None,
|
||||
ast::LitKind::Err(_) => None,
|
||||
_ => {
|
||||
self.dcx().emit_err(NonStringAbiLiteral { span: lit.span });
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue