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

@ -125,7 +125,7 @@ impl<'a, 'tcx> Annotator<'a, 'tcx> {
if let Some((depr, span)) = &depr {
is_deprecated = true;
if kind == AnnotationKind::Prohibited || kind == AnnotationKind::DeprecationProhibited {
if matches!(kind, AnnotationKind::Prohibited | AnnotationKind::DeprecationProhibited) {
let hir_id = self.tcx.hir().local_def_id_to_hir_id(def_id);
self.tcx.emit_spanned_lint(
USELESS_DEPRECATED,