about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src/lib.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-04-15 20:49:54 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2023-04-16 12:08:30 +0200
commitbcc15bba953dcb749d88950539b5e206a8bd86bb (patch)
tree4f7d940c04f0986e24a1d0e3f2eef7fdcf44bc33 /compiler/rustc_ast_lowering/src/lib.rs
parente6e956dade79bdc084dfe3078abab24656a1b483 (diff)
downloadrust-bcc15bba953dcb749d88950539b5e206a8bd86bb.tar.gz
rust-bcc15bba953dcb749d88950539b5e206a8bd86bb.zip
use matches! macro in more places
Diffstat (limited to 'compiler/rustc_ast_lowering/src/lib.rs')
-rw-r--r--compiler/rustc_ast_lowering/src/lib.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index f7ae96b7c4a..2af47e11637 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -332,10 +332,7 @@ enum FnDeclKind {
 
 impl FnDeclKind {
     fn param_impl_trait_allowed(&self) -> bool {
-        match self {
-            FnDeclKind::Fn | FnDeclKind::Inherent | FnDeclKind::Impl | FnDeclKind::Trait => true,
-            _ => false,
-        }
+        matches!(self, FnDeclKind::Fn | FnDeclKind::Inherent | FnDeclKind::Impl | FnDeclKind::Trait)
     }
 
     fn return_impl_trait_allowed(&self, tcx: TyCtxt<'_>) -> bool {