about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src/expr.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-12 05:16:50 +0000
committerbors <bors@rust-lang.org>2022-12-12 05:16:50 +0000
commit2cd2070af7643ad88d280a4933bc4fb60451e521 (patch)
treebae3a424c82e36ea4cd91f596edee0208213f167 /compiler/rustc_ast_lowering/src/expr.rs
parentb397bc0727ad27340466166455c6edd327a589c4 (diff)
parent7e0c6dba0d83dbee96bbf7eac7b4cb563e297a5f (diff)
downloadrust-2cd2070af7643ad88d280a4933bc4fb60451e521.tar.gz
rust-2cd2070af7643ad88d280a4933bc4fb60451e521.zip
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`
Diffstat (limited to 'compiler/rustc_ast_lowering/src/expr.rs')
-rw-r--r--compiler/rustc_ast_lowering/src/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs
index 24e2985cf56..3946aab646a 100644
--- a/compiler/rustc_ast_lowering/src/expr.rs
+++ b/compiler/rustc_ast_lowering/src/expr.rs
@@ -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);