@@ -13,7 +13,7 @@ use rustc_ast_pretty::pprust;
13
13
use rustc_errors:: DiagCtxtHandle ;
14
14
use rustc_hir:: { self as hir, AttrPath } ;
15
15
use rustc_span:: symbol:: { Ident , kw, sym} ;
16
- use rustc_span:: { ErrorGuaranteed , Span , Symbol } ;
16
+ use rustc_span:: { Span , Symbol } ;
17
17
18
18
pub struct SegmentIterator < ' a > {
19
19
offset : usize ,
@@ -176,7 +176,7 @@ impl<'a> ArgParser<'a> {
176
176
pub enum MetaItemOrLitParser < ' a > {
177
177
MetaItemParser ( MetaItemParser < ' a > ) ,
178
178
Lit ( MetaItemLit ) ,
179
- Err ( Span , ErrorGuaranteed ) ,
179
+ Err ( Span ) ,
180
180
}
181
181
182
182
impl < ' a > MetaItemOrLitParser < ' a > {
@@ -186,7 +186,7 @@ impl<'a> MetaItemOrLitParser<'a> {
186
186
generic_meta_item_parser. span ( )
187
187
}
188
188
MetaItemOrLitParser :: Lit ( meta_item_lit) => meta_item_lit. span ,
189
- MetaItemOrLitParser :: Err ( span, _ ) => * span,
189
+ MetaItemOrLitParser :: Err ( span) => * span,
190
190
}
191
191
}
192
192
@@ -495,12 +495,14 @@ impl<'a> MetaItemListParserContext<'a> {
495
495
// where the macro didn't expand to a literal. An error is already given
496
496
// for this at this point, and then we do continue. This makes this path
497
497
// reachable...
498
- let e = self . dcx . span_delayed_bug (
499
- * span,
500
- "expr in place where literal is expected (builtin attr parsing)" ,
501
- ) ;
502
-
503
- return Some ( MetaItemOrLitParser :: Err ( * span, e) ) ;
498
+ // FIXME(jdonszelmann): proc macro helper attributes should be filtered out and this
499
+ // shouldn't trigger anymore. See #137687
500
+ // let e = self.dcx.span_delayed_bug(
501
+ // *span,
502
+ // "expr in place where literal is expected (builtin attr parsing)",
503
+ // );
504
+
505
+ return Some ( MetaItemOrLitParser :: Err ( * span) ) ;
504
506
} else {
505
507
self . next_path ( ) ?
506
508
} ;
0 commit comments