about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-01-30 17:21:59 +0000
committerbors <bors@rust-lang.org>2025-01-30 17:21:59 +0000
commit6ac88786155774da429213a1362d4cb085047af3 (patch)
tree14420d25f4660671f5e8b7dc48ef4792617501f6 /compiler/rustc_parse/src/parser/expr.rs
parenta6434ef9c0246fa39eecb34e22807da2a68f3904 (diff)
parent9b7af17d5b5456e9f49b623cad99e15e9a1fc9cc (diff)
downloadrust-6ac88786155774da429213a1362d4cb085047af3.tar.gz
rust-6ac88786155774da429213a1362d4cb085047af3.zip
Auto merge of #136292 - matthiaskrgr:rollup-fw1tlca, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #133636 ([rustdoc] Add sans-serif font setting)
 - #135434 (Match Ergonomics 2024: update edition 2024 behavior of feature gates)
 - #135739 (Clean up uses of the unstable `dwarf_version` option)
 - #135882 (simplify `similar_tokens` from `Option<Vec<_>>` to `&[_]`)
 - #136179 (Allow transmuting generic pattern types to and from their base)
 - #136199 (Fix a couple Emscripten tests)
 - #136251 (use impl Into<String> instead of explicit type args with bounds)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs5
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)