about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/path.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-30 14:24:02 +0000
committerbors <bors@rust-lang.org>2020-10-30 14:24:02 +0000
commitffe52882ed79be67344dd6085559e308241e7f60 (patch)
treedea8fd60ec5b2aa448b12e491cf8d23053a7892a /compiler/rustc_parse/src/parser/path.rs
parent388ef349043f20a1a8a3011eaf49dee220485e0a (diff)
parent5339bd1ebeb76ea7304ff07dcf8e6c317ba0ced8 (diff)
downloadrust-ffe52882ed79be67344dd6085559e308241e7f60.tar.gz
rust-ffe52882ed79be67344dd6085559e308241e7f60.zip
Auto merge of #78424 - jyn514:THE-PAPERCLIP-COMETH, r=davidtwco
Fix some more clippy warnings

Found while working on https://github.com/rust-lang/rust/pull/77351. It turns out that `x.py clippy --fix` does work on that branch as long as you pass `CARGOFLAGS=--lib`.
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
-rw-r--r--compiler/rustc_parse/src/parser/path.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs
index 06760547eba..79e73749038 100644
--- a/compiler/rustc_parse/src/parser/path.rs
+++ b/compiler/rustc_parse/src/parser/path.rs
@@ -187,12 +187,14 @@ impl<'a> Parser<'a> {
     pub(super) fn parse_path_segment(&mut self, style: PathStyle) -> PResult<'a, PathSegment> {
         let ident = self.parse_path_segment_ident()?;
 
-        let is_args_start = |token: &Token| match token.kind {
-            token::Lt
-            | token::BinOp(token::Shl)
-            | token::OpenDelim(token::Paren)
-            | token::LArrow => true,
-            _ => false,
+        let is_args_start = |token: &Token| {
+            matches!(
+                token.kind,
+                token::Lt
+                    | token::BinOp(token::Shl)
+                    | token::OpenDelim(token::Paren)
+                    | token::LArrow
+            )
         };
         let check_args_start = |this: &mut Self| {
             this.expected_tokens.extend_from_slice(&[