about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2022-10-31 18:30:09 +0000
committerclubby789 <jamie@hill-daniel.co.uk>2022-11-11 16:31:32 +0000
commitb2da155a9aae875e6c2f5df52d8f87e734c88be7 (patch)
tree293570eff93ac9268712b67a03fd85fdf19fe978 /compiler/rustc_parse/src
parentb7b7f2716ee1655a696d3d64c3e12638d0dd19c0 (diff)
downloadrust-b2da155a9aae875e6c2f5df52d8f87e734c88be7.tar.gz
rust-b2da155a9aae875e6c2f5df52d8f87e734c88be7.zip
Introduce `ExprKind::IncludedBytes`
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/parser/path.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs
index fdc1af27f82..d46565dea89 100644
--- a/compiler/rustc_parse/src/parser/path.rs
+++ b/compiler/rustc_parse/src/parser/path.rs
@@ -631,7 +631,9 @@ impl<'a> Parser<'a> {
     /// - A single-segment path.
     pub(super) fn expr_is_valid_const_arg(&self, expr: &P<rustc_ast::Expr>) -> bool {
         match &expr.kind {
-            ast::ExprKind::Block(_, _) | ast::ExprKind::Lit(_) => true,
+            ast::ExprKind::Block(_, _)
+            | ast::ExprKind::Lit(_)
+            | ast::ExprKind::IncludedBytes(..) => true,
             ast::ExprKind::Unary(ast::UnOp::Neg, expr) => {
                 matches!(expr.kind, ast::ExprKind::Lit(_))
             }