@@ -2,7 +2,7 @@ use crate::consts::{constant_context, constant_simple};
22use crate :: differing_macro_contexts;
33use crate :: source:: snippet_opt;
44use rustc_ast:: ast:: InlineAsmTemplatePiece ;
5- use rustc_data_structures:: stable_hasher :: StableHasher ;
5+ use rustc_data_structures:: fx :: FxHasher ;
66use rustc_hir:: def:: Res ;
77use rustc_hir:: HirIdMap ;
88use rustc_hir:: {
@@ -14,7 +14,7 @@ use rustc_lexer::{tokenize, TokenKind};
1414use rustc_lint:: LateContext ;
1515use rustc_middle:: ty:: TypeckResults ;
1616use 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
517517impl < ' 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