Don't panic for fatal errors in attribute parsing.
This commit is contained in:
parent
c141f47c24
commit
de95857129
5 changed files with 56 additions and 54 deletions
|
@ -526,7 +526,7 @@ pub fn parse_nt(p: &mut Parser, sp: Span, name: &str) -> Nonterminal {
|
|||
"path" => {
|
||||
token::NtPath(Box::new(panictry!(p.parse_path(LifetimeAndTypesWithoutColons))))
|
||||
},
|
||||
"meta" => token::NtMeta(p.parse_meta_item()),
|
||||
"meta" => token::NtMeta(panictry!(p.parse_meta_item())),
|
||||
_ => {
|
||||
panic!(p.span_fatal_help(sp,
|
||||
&format!("invalid fragment specifier `{}`", name),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue