1
Fork 0

Fix using include_bytes in pattern position

This commit is contained in:
clubby789 2022-11-14 17:43:21 +00:00
parent 96ddd32c4b
commit 47eda6b7db
2 changed files with 8 additions and 2 deletions

View file

@ -507,7 +507,7 @@ impl MacResult for MacEager {
return Some(p);
}
if let Some(e) = self.expr {
if let ast::ExprKind::Lit(_) = e.kind {
if matches!(e.kind, ast::ExprKind::Lit(_) | ast::ExprKind::IncludedBytes(_)) {
return Some(P(ast::Pat {
id: ast::DUMMY_NODE_ID,
span: e.span,