Make unexpected
always "return" PResult<()>
& add unexpected_any
This prevents breakage when `?` no longer skews inference.
This commit is contained in:
parent
ee03c286cf
commit
defcc44238
7 changed files with 25 additions and 15 deletions
|
@ -151,7 +151,7 @@ fn parse_assert<'a>(cx: &mut ExtCtxt<'a>, sp: Span, stream: TokenStream) -> PRes
|
|||
};
|
||||
|
||||
if parser.token != token::Eof {
|
||||
return parser.unexpected();
|
||||
parser.unexpected()?;
|
||||
}
|
||||
|
||||
Ok(Assert { cond_expr, custom_message })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue