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:
@@ -1266,7 +1266,7 @@ pub fn expr_to_spanned_string<'a>(
|
||||
);
|
||||
Some((err, true))
|
||||
}
|
||||
Ok(ast::LitKind::Err) => None,
|
||||
Ok(ast::LitKind::Err(_)) => None,
|
||||
Err(err) => {
|
||||
report_lit_error(&cx.sess.parse_sess, err, token_lit, expr.span);
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user