@@ -4,7 +4,7 @@ use crate::errors::{
44 ParenthesizedFnTraitExpansion ,
55} ;
66use crate :: traits:: error_reporting:: report_object_safety_error;
7- use rustc_data_structures:: fx:: FxHashMap ;
7+ use rustc_data_structures:: fx:: { FxHashMap , FxIndexMap } ;
88use rustc_errors:: { pluralize, struct_span_err, Applicability , Diagnostic , ErrorGuaranteed } ;
99use rustc_hir as hir;
1010use rustc_hir:: def_id:: { DefId , LocalDefId } ;
@@ -506,7 +506,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
506506 /// emit a generic note suggesting using a `where` clause to constraint instead.
507507 pub ( crate ) fn complain_about_missing_associated_types (
508508 & self ,
509- associated_types : FxHashMap < Span , BTreeSet < DefId > > ,
509+ associated_types : FxIndexMap < Span , BTreeSet < DefId > > ,
510510 potential_assoc_types : Vec < Span > ,
511511 trait_bounds : & [ hir:: PolyTraitRef < ' _ > ] ,
512512 ) {
@@ -516,13 +516,13 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
516516 let tcx = self . tcx ( ) ;
517517 // FIXME: Marked `mut` so that we can replace the spans further below with a more
518518 // appropriate one, but this should be handled earlier in the span assignment.
519- let mut associated_types: FxHashMap < Span , Vec < _ > > = associated_types
519+ let mut associated_types: FxIndexMap < Span , Vec < _ > > = associated_types
520520 . into_iter ( )
521521 . map ( |( span, def_ids) | {
522522 ( span, def_ids. into_iter ( ) . map ( |did| tcx. associated_item ( did) ) . collect ( ) )
523523 } )
524524 . collect ( ) ;
525- let mut names: FxHashMap < String , Vec < Symbol > > = Default :: default ( ) ;
525+ let mut names: FxIndexMap < String , Vec < Symbol > > = Default :: default ( ) ;
526526 let mut names_len = 0 ;
527527
528528 // Account for things like `dyn Foo + 'a`, like in tests `issue-22434.rs` and
0 commit comments