@@ -2,7 +2,7 @@ use crate::consts::{constant_context, constant_simple};
2
2
use crate :: differing_macro_contexts;
3
3
use crate :: source:: snippet_opt;
4
4
use rustc_ast:: ast:: InlineAsmTemplatePiece ;
5
- use rustc_data_structures:: stable_hasher :: StableHasher ;
5
+ use rustc_data_structures:: fx :: FxHasher ;
6
6
use rustc_hir:: def:: Res ;
7
7
use rustc_hir:: HirIdMap ;
8
8
use rustc_hir:: {
@@ -14,7 +14,7 @@ use rustc_lexer::{tokenize, TokenKind};
14
14
use rustc_lint:: LateContext ;
15
15
use rustc_middle:: ty:: TypeckResults ;
16
16
use rustc_span:: Symbol ;
17
- use std:: hash:: Hash ;
17
+ use std:: hash:: { Hash , Hasher } ;
18
18
19
19
/// Type used to check whether two ast are the same. This is different from the
20
20
/// operator
@@ -511,15 +511,15 @@ pub struct SpanlessHash<'a, 'tcx> {
511
511
/// Context used to evaluate constant expressions.
512
512
cx : & ' a LateContext < ' tcx > ,
513
513
maybe_typeck_results : Option < & ' tcx TypeckResults < ' tcx > > ,
514
- s : StableHasher ,
514
+ s : FxHasher ,
515
515
}
516
516
517
517
impl < ' a , ' tcx > SpanlessHash < ' a , ' tcx > {
518
518
pub fn new ( cx : & ' a LateContext < ' tcx > ) -> Self {
519
519
Self {
520
520
cx,
521
521
maybe_typeck_results : cx. maybe_typeck_results ( ) ,
522
- s : StableHasher :: new ( ) ,
522
+ s : FxHasher :: default ( ) ,
523
523
}
524
524
}
525
525
0 commit comments