diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-11-28 17:25:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-28 17:25:46 +0100 |
| commit | 63ec33e929f60177a02ae3d059482e3743f1d8cc (patch) | |
| tree | 4f2119f00183d398b744abb56fbddc6f184c0c90 /compiler/rustc_expand/src | |
| parent | 8a09420ac48658cad726e0a6997687ceac4151e3 (diff) | |
| parent | a60e337c884f3201e693e6a5111b663bbc54de27 (diff) | |
Rollup merge of #104804 - nnethercote:MetaItemLit, r=petrochenkov
Rename `ast::Lit` as `ast::MetaItemLit`. And some other literal cleanups. r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_expand/src')
| -rw-r--r-- | compiler/rustc_expand/src/proc_macro_server.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_expand/src/proc_macro_server.rs b/compiler/rustc_expand/src/proc_macro_server.rs index 2e832deeecd..76165796117 100644 --- a/compiler/rustc_expand/src/proc_macro_server.rs +++ b/compiler/rustc_expand/src/proc_macro_server.rs @@ -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 { |
