diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2025-01-31 05:04:21 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2025-01-31 05:04:21 +0000 |
| commit | 7f414f9c39d8079f7c88bbdafb4d6e3a4ecea92c (patch) | |
| tree | 4456a4c6935a4d4679096be97804aabe767709ca /compiler/rustc_parse/src/parser/expr.rs | |
| parent | dc3677587798df6b0bc6bfa78ea908efded39466 (diff) | |
| parent | 9734ebb9be2ad760385555e36bb0d065e726d6f5 (diff) | |
| download | rust-7f414f9c39d8079f7c88bbdafb4d6e3a4ecea92c.tar.gz rust-7f414f9c39d8079f7c88bbdafb4d6e3a4ecea92c.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index a5b73ce4098..ffd46f20767 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -3114,9 +3114,8 @@ impl<'a> Parser<'a> { let span_before_body = this.prev_token.span; let arm_body; let is_fat_arrow = this.check(exp!(FatArrow)); - let is_almost_fat_arrow = TokenKind::FatArrow - .similar_tokens() - .is_some_and(|similar_tokens| similar_tokens.contains(&this.token.kind)); + let is_almost_fat_arrow = + TokenKind::FatArrow.similar_tokens().contains(&this.token.kind); // this avoids the compiler saying that a `,` or `}` was expected even though // the pattern isn't a never pattern (and thus an arm body is required) |
