From e4076e34f8215cff65c4deaff4ba7fbda20d2a7f Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Mon, 29 Jul 2024 21:21:15 -0400 Subject: Mark Parser::eat/check methods as must_use --- compiler/rustc_parse/src/parser/path.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_parse/src/parser/path.rs') diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index c5111226d37..70d2c98d4f1 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -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>` -- cgit 1.4.1-3-g733a5