rustc_parse: Make Parser::unexpected
public and use it in built-in macros
This commit is contained in:
parent
299136b9c7
commit
219c66c55c
3 changed files with 4 additions and 5 deletions
|
@ -120,8 +120,7 @@ fn parse_assert<'a>(
|
|||
};
|
||||
|
||||
if parser.token != token::Eof {
|
||||
parser.expect_one_of(&[], &[])?;
|
||||
unreachable!();
|
||||
return parser.unexpected();
|
||||
}
|
||||
|
||||
Ok(Assert { cond_expr, custom_message })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue