Rollup merge of #104804 - nnethercote:MetaItemLit, r=petrochenkov
Rename `ast::Lit` as `ast::MetaItemLit`. And some other literal cleanups. r? `@petrochenkov`
This commit is contained in:
commit
63ec33e929
28 changed files with 126 additions and 128 deletions
|
@ -526,11 +526,8 @@ impl server::TokenStream for Rustc<'_, '_> {
|
|||
Ok(tokenstream::TokenStream::token_alone(token::Literal(*token_lit), expr.span))
|
||||
}
|
||||
ast::ExprKind::IncludedBytes(bytes) => {
|
||||
let lit = ast::Lit::from_included_bytes(bytes, expr.span);
|
||||
Ok(tokenstream::TokenStream::token_alone(
|
||||
token::TokenKind::Literal(lit.token_lit),
|
||||
expr.span,
|
||||
))
|
||||
let lit = ast::LitKind::ByteStr(bytes.clone()).to_token_lit();
|
||||
Ok(tokenstream::TokenStream::token_alone(token::TokenKind::Literal(lit), expr.span))
|
||||
}
|
||||
ast::ExprKind::Unary(ast::UnOp::Neg, e) => match &e.kind {
|
||||
ast::ExprKind::Lit(token_lit) => match token_lit {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue