File tree 2 files changed +8
-2
lines changed
compiler/rustc_expand/src
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -507,7 +507,7 @@ impl MacResult for MacEager {
507
507
return Some ( p) ;
508
508
}
509
509
if let Some ( e) = self . expr {
510
- if let ast:: ExprKind :: Lit ( _) = e . kind {
510
+ if matches ! ( e . kind , ast:: ExprKind :: Lit ( _) | ast :: ExprKind :: IncludedBytes ( _ ) ) {
511
511
return Some ( P ( ast:: Pat {
512
512
id : ast:: DUMMY_NODE_ID ,
513
513
span : e. span ,
Original file line number Diff line number Diff line change @@ -123,4 +123,10 @@ expand_expr_fail!(echo_pm!(arbitrary_expression() + "etc"));
123
123
124
124
const _: u32 = recursive_expand ! ( ) ; //~ ERROR: recursion limit reached while expanding `recursive_expand!`
125
125
126
- fn main ( ) { }
126
+ fn main ( ) {
127
+ // https://github.com/rust-lang/rust/issues/104414
128
+ match b"Included file contents\n " {
129
+ include_bytes ! ( "auxiliary/included-file.txt" ) => ( ) ,
130
+ _ => panic ! ( "include_bytes! in pattern" ) ,
131
+ }
132
+ }
You can’t perform that action at this time.
0 commit comments