1
1
use crate :: constrained_generic_params:: { identify_constrained_generic_params, Parameter } ;
2
2
use hir:: def:: DefKind ;
3
3
use rustc_ast as ast;
4
- use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
4
+ use rustc_data_structures:: fx:: { FxHashMap , FxHashSet , FxIndexSet } ;
5
5
use rustc_errors:: { pluralize, struct_span_err, Applicability , DiagnosticBuilder , ErrorGuaranteed } ;
6
6
use rustc_hir as hir;
7
7
use rustc_hir:: def_id:: { DefId , LocalDefId } ;
@@ -412,7 +412,7 @@ fn check_gat_where_clauses(tcx: TyCtxt<'_>, associated_items: &[hir::TraitItemRe
412
412
. iter ( )
413
413
. copied ( )
414
414
. collect :: < Vec < _ > > ( ) ,
415
- & FxHashSet :: default ( ) ,
415
+ & FxIndexSet :: default ( ) ,
416
416
gat_def_id. def_id ,
417
417
gat_generics,
418
418
)
@@ -462,10 +462,10 @@ fn check_gat_where_clauses(tcx: TyCtxt<'_>, associated_items: &[hir::TraitItemRe
462
462
. into_iter ( )
463
463
. filter ( |clause| match clause. kind ( ) . skip_binder ( ) {
464
464
ty:: PredicateKind :: RegionOutlives ( ty:: OutlivesPredicate ( a, b) ) => {
465
- !region_known_to_outlive ( tcx, gat_hir, param_env, & FxHashSet :: default ( ) , a, b)
465
+ !region_known_to_outlive ( tcx, gat_hir, param_env, & FxIndexSet :: default ( ) , a, b)
466
466
}
467
467
ty:: PredicateKind :: TypeOutlives ( ty:: OutlivesPredicate ( a, b) ) => {
468
- !ty_known_to_outlive ( tcx, gat_hir, param_env, & FxHashSet :: default ( ) , a, b)
468
+ !ty_known_to_outlive ( tcx, gat_hir, param_env, & FxIndexSet :: default ( ) , a, b)
469
469
}
470
470
_ => bug ! ( "Unexpected PredicateKind" ) ,
471
471
} )
@@ -547,7 +547,7 @@ fn gather_gat_bounds<'tcx, T: TypeFoldable<'tcx>>(
547
547
param_env : ty:: ParamEnv < ' tcx > ,
548
548
item_hir : hir:: HirId ,
549
549
to_check : T ,
550
- wf_tys : & FxHashSet < Ty < ' tcx > > ,
550
+ wf_tys : & FxIndexSet < Ty < ' tcx > > ,
551
551
gat_def_id : LocalDefId ,
552
552
gat_generics : & ' tcx ty:: Generics ,
553
553
) -> Option < FxHashSet < ty:: Predicate < ' tcx > > > {
@@ -654,7 +654,7 @@ fn ty_known_to_outlive<'tcx>(
654
654
tcx : TyCtxt < ' tcx > ,
655
655
id : hir:: HirId ,
656
656
param_env : ty:: ParamEnv < ' tcx > ,
657
- wf_tys : & FxHashSet < Ty < ' tcx > > ,
657
+ wf_tys : & FxIndexSet < Ty < ' tcx > > ,
658
658
ty : Ty < ' tcx > ,
659
659
region : ty:: Region < ' tcx > ,
660
660
) -> bool {
@@ -671,7 +671,7 @@ fn region_known_to_outlive<'tcx>(
671
671
tcx : TyCtxt < ' tcx > ,
672
672
id : hir:: HirId ,
673
673
param_env : ty:: ParamEnv < ' tcx > ,
674
- wf_tys : & FxHashSet < Ty < ' tcx > > ,
674
+ wf_tys : & FxIndexSet < Ty < ' tcx > > ,
675
675
region_a : ty:: Region < ' tcx > ,
676
676
region_b : ty:: Region < ' tcx > ,
677
677
) -> bool {
@@ -695,7 +695,7 @@ fn resolve_regions_with_wf_tys<'tcx>(
695
695
tcx : TyCtxt < ' tcx > ,
696
696
id : hir:: HirId ,
697
697
param_env : ty:: ParamEnv < ' tcx > ,
698
- wf_tys : & FxHashSet < Ty < ' tcx > > ,
698
+ wf_tys : & FxIndexSet < Ty < ' tcx > > ,
699
699
add_constraints : impl for < ' a > FnOnce ( & ' a InferCtxt < ' tcx > , & ' a RegionBoundPairs < ' tcx > ) ,
700
700
) -> bool {
701
701
// Unfortunately, we have to use a new `InferCtxt` each call, because
0 commit comments