Skip to content

Commit f21d909

Browse files
committed
Use FxHasher
1 parent 27ac647 commit f21d909

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clippy_utils/src/hir_utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::consts::{constant_context, constant_simple};
22
use crate::differing_macro_contexts;
33
use crate::source::snippet_opt;
44
use rustc_ast::ast::InlineAsmTemplatePiece;
5-
use rustc_data_structures::stable_hasher::StableHasher;
5+
use rustc_data_structures::fx::FxHasher;
66
use rustc_hir::def::Res;
77
use rustc_hir::HirIdMap;
88
use rustc_hir::{
@@ -14,7 +14,7 @@ use rustc_lexer::{tokenize, TokenKind};
1414
use rustc_lint::LateContext;
1515
use rustc_middle::ty::TypeckResults;
1616
use rustc_span::Symbol;
17-
use std::hash::Hash;
17+
use std::hash::{Hash, Hasher};
1818

1919
/// Type used to check whether two ast are the same. This is different from the
2020
/// operator
@@ -511,15 +511,15 @@ pub struct SpanlessHash<'a, 'tcx> {
511511
/// Context used to evaluate constant expressions.
512512
cx: &'a LateContext<'tcx>,
513513
maybe_typeck_results: Option<&'tcx TypeckResults<'tcx>>,
514-
s: StableHasher,
514+
s: FxHasher,
515515
}
516516

517517
impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
518518
pub fn new(cx: &'a LateContext<'tcx>) -> Self {
519519
Self {
520520
cx,
521521
maybe_typeck_results: cx.maybe_typeck_results(),
522-
s: StableHasher::new(),
522+
s: FxHasher::default(),
523523
}
524524
}
525525

0 commit comments

Comments
 (0)