diff options
| author | bors <bors@rust-lang.org> | 2024-08-15 20:04:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-15 20:04:49 +0000 |
| commit | 2c93fabd98d2c183bcb3afed1f7d51b2517ac5ed (patch) | |
| tree | 13c751c5f4e50f36688d181702032d81dcb7b9fe /compiler/rustc_parse/src/parser/path.rs | |
| parent | d2b5aa6552c8acf67f38a2ad92062a32ec542f08 (diff) | |
| parent | ef72a6a7111731049e840c129fc3db4838df5352 (diff) | |
| download | rust-2c93fabd98d2c183bcb3afed1f7d51b2517ac5ed.tar.gz rust-2c93fabd98d2c183bcb3afed1f7d51b2517ac5ed.zip | |
Auto merge of #129130 - matthiaskrgr:rollup-603jta0, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #128348 (Unconditionally allow shadow call-stack sanitizer for AArch64) - #129065 (Use `impl PartialEq<TokenKind> for Token` more.) - #129072 (Infer async closure args from `Fn` bound even if there is no corresponding `Future` bound on return) - #129096 (Print more verbose error for commands that capture output) - #129101 (Fix projections when parent capture is by-ref but child capture is by-value in the `ByMoveBody` pass) - #129106 (Remove redundant type ops: `Eq`/`Subtype`) - #129122 (Remove duplicated `Rustdoc::output` method from `run-make-support` lib) - #129124 (rustdoc-json: Use FxHashMap from rustdoc_json_types) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/path.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 6f82d6b9826..007d760aba3 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -358,9 +358,9 @@ impl<'a> Parser<'a> { })?; let span = lo.to(self.prev_token.span); AngleBracketedArgs { args, span }.into() - } else if self.token.kind == token::OpenDelim(Delimiter::Parenthesis) + } else if self.token == token::OpenDelim(Delimiter::Parenthesis) // FIXME(return_type_notation): Could also recover `...` here. - && self.look_ahead(1, |tok| tok.kind == token::DotDot) + && self.look_ahead(1, |t| *t == token::DotDot) { self.bump(); // ( self.bump(); // .. @@ -384,7 +384,7 @@ impl<'a> Parser<'a> { let token_before_parsing = self.token.clone(); let mut snapshot = None; if self.may_recover() - && prev_token_before_parsing.kind == token::PathSep + && prev_token_before_parsing == token::PathSep && (style == PathStyle::Expr && self.token.can_begin_expr() || style == PathStyle::Pat && self.token.can_begin_pattern()) { @@ -393,7 +393,7 @@ impl<'a> Parser<'a> { let (inputs, _) = match self.parse_paren_comma_seq(|p| p.parse_ty()) { Ok(output) => output, - Err(mut error) if prev_token_before_parsing.kind == token::PathSep => { + Err(mut error) if prev_token_before_parsing == token::PathSep => { error.span_label( prev_token_before_parsing.span.to(token_before_parsing.span), "while parsing this parenthesized list of type arguments starting here", |
