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
|
@ -189,7 +189,7 @@ pub fn parse_asm_args<'a>(
|
|||
args.templates.push(template);
|
||||
continue;
|
||||
} else {
|
||||
return p.unexpected();
|
||||
p.unexpected_any()?
|
||||
};
|
||||
|
||||
allow_templates = false;
|
||||
|
|
|
@ -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