@@ -6,7 +6,7 @@ use crate::infer::error_reporting::nice_region_error::NiceRegionError;
6
6
use crate :: infer:: lexical_region_resolve:: RegionResolutionError ;
7
7
use crate :: infer:: { Subtype , ValuePairs } ;
8
8
use crate :: traits:: ObligationCauseCode :: CompareImplMethodObligation ;
9
- use rustc_data_structures:: fx:: FxHashSet ;
9
+ use rustc_data_structures:: fx:: FxIndexSet ;
10
10
use rustc_errors:: ErrorReported ;
11
11
use rustc_middle:: ty:: error:: ExpectedFound ;
12
12
use rustc_middle:: ty:: fold:: TypeFoldable ;
@@ -70,7 +70,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
70
70
// Because this is confusing as hell the first time you see it, we give a short message
71
71
// explaining the situation and proposing constraining the type param with a named lifetime
72
72
// so that the `impl` will have one to tie them together.
73
- struct AssocTypeFinder ( FxHashSet < ty:: ParamTy > ) ;
73
+ struct AssocTypeFinder ( FxIndexSet < ty:: ParamTy > ) ;
74
74
impl < ' tcx > ty:: fold:: TypeVisitor < ' tcx > for AssocTypeFinder {
75
75
fn visit_ty ( & mut self , ty : Ty < ' tcx > ) -> bool {
76
76
debug ! ( "assoc type finder ty {:?} {:?}" , ty, ty. kind) ;
@@ -80,7 +80,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
80
80
ty. super_visit_with ( self )
81
81
}
82
82
}
83
- let mut visitor = AssocTypeFinder ( FxHashSet :: default ( ) ) ;
83
+ let mut visitor = AssocTypeFinder ( FxIndexSet :: default ( ) ) ;
84
84
trait_fn_sig. output ( ) . visit_with ( & mut visitor) ;
85
85
if let Some ( id) = tcx. hir ( ) . as_local_hir_id ( trait_def_id) {
86
86
let parent_id = tcx. hir ( ) . get_parent_item ( id) ;
0 commit comments