about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNiklas Jonsson <niklasandersjonsson@gmail.com>2022-07-16 15:16:57 +0200
committerNiklas Jonsson <niklasandersjonsson@gmail.com>2022-09-10 11:49:12 +0200
commit8d3c30c00491b8452300d5ebaeb7822c9271306f (patch)
treec5bd568c4528edd2ee7d6b4ff4adf5cbade9f9b4 /src
parentdb9d86b58dff2a19d84d5e557641dfbb4cbb3a8d (diff)
downloadrust-8d3c30c00491b8452300d5ebaeb7822c9271306f.tar.gz
rust-8d3c30c00491b8452300d5ebaeb7822c9271306f.zip
rustc_error, rustc_private, rustc_ast: Switch to stable hash containers
Diffstat (limited to 'src')
-rw-r--r--src/tools/clippy/clippy_lints/src/matches/match_same_arms.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/clippy/clippy_lints/src/matches/match_same_arms.rs b/src/tools/clippy/clippy_lints/src/matches/match_same_arms.rs
index 93874b103b4..d37f44d4a17 100644
--- a/src/tools/clippy/clippy_lints/src/matches/match_same_arms.rs
+++ b/src/tools/clippy/clippy_lints/src/matches/match_same_arms.rs
@@ -8,11 +8,10 @@ use rustc_arena::DroplessArena;
 use rustc_ast::ast::LitKind;
 use rustc_errors::Applicability;
 use rustc_hir::def_id::DefId;
-use rustc_hir::{Arm, Expr, ExprKind, HirId, HirIdMap, HirIdSet, Pat, PatKind, RangeEnd};
+use rustc_hir::{Arm, Expr, ExprKind, HirId, HirIdMap, HirIdMapEntry, HirIdSet, Pat, PatKind, RangeEnd};
 use rustc_lint::LateContext;
 use rustc_middle::ty;
 use rustc_span::Symbol;
-use std::collections::hash_map::Entry;
 
 use super::MATCH_SAME_ARMS;
 
@@ -71,9 +70,9 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, arms: &'tcx [Arm<'_>]) {
                 if let Some(a_id) = path_to_local(a);
                 if let Some(b_id) = path_to_local(b);
                 let entry = match local_map.entry(a_id) {
-                    Entry::Vacant(entry) => entry,
+                    HirIdMapEntry::Vacant(entry) => entry,
                     // check if using the same bindings as before
-                    Entry::Occupied(entry) => return *entry.get() == b_id,
+                    HirIdMapEntry::Occupied(entry) => return *entry.get() == b_id,
                 };
                 // the names technically don't have to match; this makes the lint more conservative
                 if cx.tcx.hir().name(a_id) == cx.tcx.hir().name(b_id);