about summary refs log tree commit diff
path: root/compiler/rustc_const_eval
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2023-01-30 12:01:09 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2023-01-30 12:26:26 +0000
commitf1d273cbfbebe108306455b7b34bbc625a24fa7a (patch)
tree532b2f1e1b5c3a2a77432c2c7953ced13581ab37 /compiler/rustc_const_eval
parent4d75f618323cb26a31396f20fe91c35efba9b823 (diff)
downloadrust-f1d273cbfbebe108306455b7b34bbc625a24fa7a.tar.gz
rust-f1d273cbfbebe108306455b7b34bbc625a24fa7a.zip
Replace some `_ == _ || _ == _`s with `matches!(_, _ | _)`s
Diffstat (limited to 'compiler/rustc_const_eval')
-rw-r--r--compiler/rustc_const_eval/src/transform/validate.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/transform/validate.rs b/compiler/rustc_const_eval/src/transform/validate.rs
index a2f2457487a..72f456138ef 100644
--- a/compiler/rustc_const_eval/src/transform/validate.rs
+++ b/compiler/rustc_const_eval/src/transform/validate.rs
@@ -754,7 +754,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
                 // FIXME(JakobDegen) The validator should check that `self.mir_phase <
                 // DropsLowered`. However, this causes ICEs with generation of drop shims, which
                 // seem to fail to set their `MirPhase` correctly.
-                if *kind == RetagKind::Raw || *kind == RetagKind::TwoPhase {
+                if matches!(kind, RetagKind::Raw | RetagKind::TwoPhase) {
                     self.fail(location, format!("explicit `{:?}` is forbidden", kind));
                 }
             }