Mark Parser::eat/check methods as must_use

This commit is contained in:
Michael Goulet 2024-07-29 21:21:15 -04:00
parent 612a33f20b
commit e4076e34f8
9 changed files with 44 additions and 13 deletions

View file

@ -24,7 +24,7 @@ fn parse_pat_ty<'a>(cx: &mut ExtCtxt<'a>, stream: TokenStream) -> PResult<'a, (P
let mut parser = cx.new_parser_from_tts(stream);
let ty = parser.parse_ty()?;
parser.eat_keyword(sym::is);
parser.expect_keyword(sym::is)?;
let pat = parser.parse_pat_no_top_alt(None, None)?;
Ok((ty, pat))