@@ -2,9 +2,9 @@ use crate::infer::outlives::env::RegionBoundPairs;
2
2
use crate :: infer:: { GenericKind , VerifyBound } ;
3
3
use crate :: traits;
4
4
use rustc_data_structures:: captures:: Captures ;
5
- use rustc_data_structures:: fx:: FxHashSet ;
6
5
use rustc_hir:: def_id:: DefId ;
7
6
use rustc_middle:: ty:: subst:: { GenericArg , GenericArgKind , InternalSubsts , Subst } ;
7
+ use rustc_middle:: ty:: walk:: MiniSet ;
8
8
use rustc_middle:: ty:: { self , Ty , TyCtxt } ;
9
9
10
10
/// The `TypeOutlives` struct has the job of "lowering" a `T: 'a`
@@ -33,7 +33,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
33
33
/// Returns a "verify bound" that encodes what we know about
34
34
/// `generic` and the regions it outlives.
35
35
pub fn generic_bound ( & self , generic : GenericKind < ' tcx > ) -> VerifyBound < ' tcx > {
36
- let mut visited = FxHashSet :: default ( ) ;
36
+ let mut visited = MiniSet :: new ( ) ;
37
37
match generic {
38
38
GenericKind :: Param ( param_ty) => self . param_bound ( param_ty) ,
39
39
GenericKind :: Projection ( projection_ty) => {
@@ -45,7 +45,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
45
45
fn type_bound (
46
46
& self ,
47
47
ty : Ty < ' tcx > ,
48
- visited : & mut FxHashSet < GenericArg < ' tcx > > ,
48
+ visited : & mut MiniSet < GenericArg < ' tcx > > ,
49
49
) -> VerifyBound < ' tcx > {
50
50
match ty. kind {
51
51
ty:: Param ( p) => self . param_bound ( p) ,
@@ -149,7 +149,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
149
149
pub fn projection_bound (
150
150
& self ,
151
151
projection_ty : ty:: ProjectionTy < ' tcx > ,
152
- visited : & mut FxHashSet < GenericArg < ' tcx > > ,
152
+ visited : & mut MiniSet < GenericArg < ' tcx > > ,
153
153
) -> VerifyBound < ' tcx > {
154
154
debug ! ( "projection_bound(projection_ty={:?})" , projection_ty) ;
155
155
@@ -187,7 +187,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
187
187
fn recursive_bound (
188
188
& self ,
189
189
parent : GenericArg < ' tcx > ,
190
- visited : & mut FxHashSet < GenericArg < ' tcx > > ,
190
+ visited : & mut MiniSet < GenericArg < ' tcx > > ,
191
191
) -> VerifyBound < ' tcx > {
192
192
let mut bounds = parent
193
193
. walk_shallow ( visited)
0 commit comments