Auto merge of #105160 - nnethercote:rm-Lit-token_lit, r=petrochenkov
Remove `token::Lit` from `ast::MetaItemLit`. Currently `ast::MetaItemLit` represents the literal kind twice. This PR removes that redundancy. Best reviewed one commit at a time. r? `@petrochenkov`
This commit is contained in:
commit
2cd2070af7
28 changed files with 244 additions and 171 deletions
|
@ -1231,7 +1231,7 @@ pub fn expr_to_spanned_string<'a>(
|
|||
Err(match expr.kind {
|
||||
ast::ExprKind::Lit(token_lit) => match ast::LitKind::from_token_lit(token_lit) {
|
||||
Ok(ast::LitKind::Str(s, style)) => return Ok((s, style, expr.span)),
|
||||
Ok(ast::LitKind::ByteStr(_)) => {
|
||||
Ok(ast::LitKind::ByteStr(..)) => {
|
||||
let mut err = cx.struct_span_err(expr.span, err_msg);
|
||||
let span = expr.span.shrink_to_lo();
|
||||
err.span_suggestion(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue