diff options
| author | Marijn Schouten <mhkbst@gmail.com> | 2025-01-22 16:50:22 +0100 | 
|---|---|---|
| committer | Marijn Schouten <mhkbst@gmail.com> | 2025-01-23 11:45:42 +0100 | 
| commit | 5f01e12ea8035fdfc23eefaf6b580dbb9a8863ec (patch) | |
| tree | ca63b69bce7df9b09d83b78d939b94d298f66f2a /compiler/rustc_parse/src/parser/expr.rs | |
| parent | ccb967438de778b7f4ee3cf94f3e8163f6f5c53f (diff) | |
| download | rust-5f01e12ea8035fdfc23eefaf6b580dbb9a8863ec.tar.gz rust-5f01e12ea8035fdfc23eefaf6b580dbb9a8863ec.zip  | |
simplify similar_tokens from Vec<_> to &[_]
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index cf87c8c9495..0affca1f825 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -3114,8 +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().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)  | 
