Skip to content

Commit 4e313a5

Browse files
committed
Auto merge of rust-lang#99334 - NiklasJonsson:84447/error-privacy, r=oli-obk
rustc_error, rustc_private: Switch to stable hash containers Relates rust-lang#84447
2 parents 42361da + 41b3084 commit 4e313a5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clippy_lints/src/matches/match_same_arms.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ use rustc_arena::DroplessArena;
88
use rustc_ast::ast::LitKind;
99
use rustc_errors::Applicability;
1010
use rustc_hir::def_id::DefId;
11-
use rustc_hir::{Arm, Expr, ExprKind, HirId, HirIdMap, HirIdSet, Pat, PatKind, RangeEnd};
11+
use rustc_hir::{Arm, Expr, ExprKind, HirId, HirIdMap, HirIdMapEntry, HirIdSet, Pat, PatKind, RangeEnd};
1212
use rustc_lint::LateContext;
1313
use rustc_middle::ty;
1414
use rustc_span::Symbol;
15-
use std::collections::hash_map::Entry;
1615

1716
use super::MATCH_SAME_ARMS;
1817

@@ -71,9 +70,9 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, arms: &'tcx [Arm<'_>]) {
7170
if let Some(a_id) = path_to_local(a);
7271
if let Some(b_id) = path_to_local(b);
7372
let entry = match local_map.entry(a_id) {
74-
Entry::Vacant(entry) => entry,
73+
HirIdMapEntry::Vacant(entry) => entry,
7574
// check if using the same bindings as before
76-
Entry::Occupied(entry) => return *entry.get() == b_id,
75+
HirIdMapEntry::Occupied(entry) => return *entry.get() == b_id,
7776
};
7877
// the names technically don't have to match; this makes the lint more conservative
7978
if cx.tcx.hir().name(a_id) == cx.tcx.hir().name(b_id);

0 commit comments

Comments
 (0)