replace parse_lifetime with expect_lifetime
made `parser::Parser::expect_lifetime` public, so it can be called from `macro_parser::parse_nt`
This commit is contained in:
parent
03a51019a4
commit
e12b87096a
2 changed files with 2 additions and 2 deletions
|
@ -603,7 +603,7 @@ fn parse_nt<'a>(p: &mut Parser<'a>, sp: Span, name: &str) -> Nonterminal {
|
|||
"path" => token::NtPath(panictry!(p.parse_path_common(PathStyle::Type, false))),
|
||||
"meta" => token::NtMeta(panictry!(p.parse_meta_item())),
|
||||
"vis" => token::NtVis(panictry!(p.parse_visibility(true))),
|
||||
"lifetime" => token::NtLifetime(panictry!(p.parse_lifetime())),
|
||||
"lifetime" => token::NtLifetime(p.expect_lifetime()),
|
||||
// this is not supposed to happen, since it has been checked
|
||||
// when compiling the macro.
|
||||
_ => p.span_bug(sp, "invalid fragment specifier")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue