about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-12-28 14:13:12 +0100
committerGitHub <noreply@github.com>2020-12-28 14:13:12 +0100
commitc51172f38a901ab170432330dd943c5a9b1adb53 (patch)
tree18adf127fc83477a253f9987c5dc7cbb2f69c071 /compiler/rustc_codegen_ssa
parent3f8c979c4ba5ad7f749bbd883ad6f97747e2c07e (diff)
parentd12a358673b17ed74fe1a584b4cab66fe62e18d0 (diff)
downloadrust-c51172f38a901ab170432330dd943c5a9b1adb53.tar.gz
rust-c51172f38a901ab170432330dd943c5a9b1adb53.zip
Rollup merge of #80344 - matthiaskrgr:matches, r=Dylan-DPC
use matches!() macro in more places
Diffstat (limited to 'compiler/rustc_codegen_ssa')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/analyze.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/analyze.rs b/compiler/rustc_codegen_ssa/src/mir/analyze.rs
index 44bb0deeae9..57e49ba8d1a 100644
--- a/compiler/rustc_codegen_ssa/src/mir/analyze.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/analyze.rs
@@ -112,12 +112,12 @@ impl<Bx: BuilderMethods<'a, 'tcx>> LocalAnalyzer<'mir, 'a, 'tcx, Bx> {
             };
 
             // Allow uses of projections that are ZSTs or from scalar fields.
-            let is_consume = match context {
+            let is_consume = matches!(
+                context,
                 PlaceContext::NonMutatingUse(
                     NonMutatingUseContext::Copy | NonMutatingUseContext::Move,
-                ) => true,
-                _ => false,
-            };
+                )
+            );
             if is_consume {
                 let base_ty =
                     mir::Place::ty_from(place_ref.local, proj_base, self.fx.mir, cx.tcx());