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

@@ -313,7 +313,8 @@ impl<'a> Parser<'a> {
}
// Generic arguments are found - `<`, `(`, `::<` or `::(`.
self.eat(&token::PathSep);
// First, eat `::` if it exists.
let _ = self.eat(&token::PathSep);
let lo = self.token.span;
let args = if self.eat_lt() {
// `<'a, T, A = U>`