1
Fork 0

Don't panic for fatal errors in attribute parsing.

This commit is contained in:
Eli Friedman 2015-10-23 19:02:38 -07:00
parent c141f47c24
commit de95857129
5 changed files with 56 additions and 54 deletions

View file

@ -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),