@@ -4,7 +4,7 @@ use crate::infer::error_reporting::nice_region_error::NiceRegionError;
44use  crate :: infer:: lexical_region_resolve:: RegionResolutionError ; 
55use  crate :: infer:: { SubregionOrigin ,  TypeTrace } ; 
66use  crate :: traits:: { ObligationCauseCode ,  UnifyReceiverContext } ; 
7- use  rustc_data_structures:: fx:: FxHashSet ; 
7+ use  rustc_data_structures:: fx:: FxIndexSet ; 
88use  rustc_errors:: { struct_span_err,  Applicability ,  Diagnostic ,  ErrorGuaranteed ,  MultiSpan } ; 
99use  rustc_hir:: def_id:: DefId ; 
1010use  rustc_hir:: intravisit:: { walk_ty,  Visitor } ; 
@@ -236,7 +236,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
236236            // Same case of `impl Foo for dyn Bar { fn qux(&self) {} }` introducing a `'static` 
237237            // lifetime as above, but called using a fully-qualified path to the method: 
238238            // `Foo::qux(bar)`. 
239-             let  mut  v = TraitObjectVisitor ( FxHashSet :: default ( ) ) ; 
239+             let  mut  v = TraitObjectVisitor ( FxIndexSet :: default ( ) ) ; 
240240            v. visit_ty ( param. param_ty ) ; 
241241            if  let  Some ( ( ident,  self_ty) )  =
242242                self . get_impl_ident_and_self_ty_from_trait ( item_def_id,  & v. 0 ) 
@@ -408,7 +408,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
408408    fn  get_impl_ident_and_self_ty_from_trait ( 
409409        & self , 
410410        def_id :  DefId , 
411-         trait_objects :  & FxHashSet < DefId > , 
411+         trait_objects :  & FxIndexSet < DefId > , 
412412    )  -> Option < ( Ident ,  & ' tcx  hir:: Ty < ' tcx > ) >  { 
413413        let  tcx = self . tcx ( ) ; 
414414        match  tcx. hir ( ) . get_if_local ( def_id)  { 
@@ -490,7 +490,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
490490            return  false ; 
491491        } ; 
492492
493-         let  mut  v = TraitObjectVisitor ( FxHashSet :: default ( ) ) ; 
493+         let  mut  v = TraitObjectVisitor ( FxIndexSet :: default ( ) ) ; 
494494        v. visit_ty ( ty) ; 
495495
496496        // Get the `Ident` of the method being called and the corresponding `impl` (to point at 
@@ -506,7 +506,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
506506    fn  suggest_constrain_dyn_trait_in_impl ( 
507507        & self , 
508508        err :  & mut  Diagnostic , 
509-         found_dids :  & FxHashSet < DefId > , 
509+         found_dids :  & FxIndexSet < DefId > , 
510510        ident :  Ident , 
511511        self_ty :  & hir:: Ty < ' _ > , 
512512    )  -> bool  { 
@@ -538,7 +538,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
538538} 
539539
540540/// Collect all the trait objects in a type that could have received an implicit `'static` lifetime. 
541- pub  struct  TraitObjectVisitor ( pub  FxHashSet < DefId > ) ; 
541+ pub  struct  TraitObjectVisitor ( pub  FxIndexSet < DefId > ) ; 
542542
543543impl < ' tcx >  TypeVisitor < ' tcx >  for  TraitObjectVisitor  { 
544544    fn  visit_ty ( & mut  self ,  t :  Ty < ' tcx > )  -> ControlFlow < Self :: BreakTy >  { 
0 commit comments