1
Fork 0

Replace some _ == _ || _ == _s with matches!(_, _ | _)s

This commit is contained in:
Maybe Waffle 2023-01-30 12:01:09 +00:00
parent 4d75f61832
commit f1d273cbfb
7 changed files with 7 additions and 7 deletions

View file

@ -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));
}
}