diff options
Diffstat (limited to 'compiler/rustc_attr_parsing/src/context.rs')
| -rw-r--r-- | compiler/rustc_attr_parsing/src/context.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_attr_parsing/src/context.rs b/compiler/rustc_attr_parsing/src/context.rs index 99eee0d3c4a..0e6b0bab082 100644 --- a/compiler/rustc_attr_parsing/src/context.rs +++ b/compiler/rustc_attr_parsing/src/context.rs @@ -333,7 +333,10 @@ impl<'sess> AttributeParser<'sess> { { lit } else { - let guar = self.dcx().has_errors().unwrap(); + let guar = self.dcx().span_delayed_bug( + args.span().unwrap_or(DUMMY_SP), + "expr in place where literal is expected (builtin attr parsing)", + ); ast::MetaItemLit { symbol: kw::Empty, suffix: None, |
