X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Frustc_parse%2Fsrc%2Fparser%2Fpath.rs;h=d46565dea893119d48736a56d5ac8190ac79285a;hb=7db7cbd49f89ed38212cb062605eaaced2e1bc79;hp=fdc1af27f82e4206e3e7d95eec13f6ffb59a4a92;hpb=56f132565eb31eeb9ec7e1800a6ab2ca354e710e;p=rust.git 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 @@ fn parse_assoc_equality_term( /// - A single-segment path. pub(super) fn expr_is_valid_const_arg(&self, expr: &P) -> 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(_)) }