rustc_parse: Make Parser::unexpected public and use it in built-in macros
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user