about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/path.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-07-29 21:21:15 -0400
committerMichael Goulet <michael@errs.io>2024-07-29 21:29:08 -0400
commite4076e34f8215cff65c4deaff4ba7fbda20d2a7f (patch)
tree539527bcc770117a00cf7234ea292cd6a5b474b6 /compiler/rustc_parse/src/parser/path.rs
parent612a33f20b9b2c27380edbc4b26a01433ed114bc (diff)
downloadrust-e4076e34f8215cff65c4deaff4ba7fbda20d2a7f.tar.gz
rust-e4076e34f8215cff65c4deaff4ba7fbda20d2a7f.zip
Mark Parser::eat/check methods as must_use
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
-rw-r--r--compiler/rustc_parse/src/parser/path.rs3
1 files changed, 2 insertions, 1 deletions
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>`