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
|
@ -97,7 +97,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
}
|
||||
ExprKind::IncludedBytes(bytes) => hir::ExprKind::Lit(respan(
|
||||
self.lower_span(e.span),
|
||||
LitKind::ByteStr(bytes.clone()),
|
||||
LitKind::ByteStr(bytes.clone(), StrStyle::Cooked),
|
||||
)),
|
||||
ExprKind::Cast(expr, ty) => {
|
||||
let expr = self.lower_expr(expr);
|
||||
|
|
|
@ -958,7 +958,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
lit
|
||||
} else {
|
||||
MetaItemLit {
|
||||
token_lit: token::Lit::new(token::LitKind::Err, kw::Empty, None),
|
||||
symbol: kw::Empty,
|
||||
suffix: None,
|
||||
kind: LitKind::Err,
|
||||
span: DUMMY_SP,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue