44
55use crate :: ty:: subst:: { GenericArg , GenericArgKind } ;
66use crate :: ty:: { self , Ty , TyCtxt , TypeFoldable } ;
7- use rustc_data_structures:: mini_set :: MiniSet ;
7+ use rustc_data_structures:: sso :: SsoHashSet ;
88use smallvec:: SmallVec ;
99
1010#[ derive( Debug ) ]
@@ -51,7 +51,7 @@ impl<'tcx> TyCtxt<'tcx> {
5151 /// Push onto `out` all the things that must outlive `'a` for the condition
5252 /// `ty0: 'a` to hold. Note that `ty0` must be a **fully resolved type**.
5353 pub fn push_outlives_components ( self , ty0 : Ty < ' tcx > , out : & mut SmallVec < [ Component < ' tcx > ; 4 ] > ) {
54- let mut visited = MiniSet :: new ( ) ;
54+ let mut visited = SsoHashSet :: new ( ) ;
5555 compute_components ( self , ty0, out, & mut visited) ;
5656 debug ! ( "components({:?}) = {:?}" , ty0, out) ;
5757 }
@@ -61,7 +61,7 @@ fn compute_components(
6161 tcx : TyCtxt < ' tcx > ,
6262 ty : Ty < ' tcx > ,
6363 out : & mut SmallVec < [ Component < ' tcx > ; 4 ] > ,
64- visited : & mut MiniSet < GenericArg < ' tcx > > ,
64+ visited : & mut SsoHashSet < GenericArg < ' tcx > > ,
6565) {
6666 // Descend through the types, looking for the various "base"
6767 // components and collecting them into `out`. This is not written
@@ -142,7 +142,7 @@ fn compute_components(
142142 // OutlivesProjectionComponents. Continue walking
143143 // through and constrain Pi.
144144 let mut subcomponents = smallvec ! [ ] ;
145- let mut subvisited = MiniSet :: new ( ) ;
145+ let mut subvisited = SsoHashSet :: new ( ) ;
146146 compute_components_recursive ( tcx, ty. into ( ) , & mut subcomponents, & mut subvisited) ;
147147 out. push ( Component :: EscapingProjection ( subcomponents. into_iter ( ) . collect ( ) ) ) ;
148148 }
@@ -194,7 +194,7 @@ fn compute_components_recursive(
194194 tcx : TyCtxt < ' tcx > ,
195195 parent : GenericArg < ' tcx > ,
196196 out : & mut SmallVec < [ Component < ' tcx > ; 4 ] > ,
197- visited : & mut MiniSet < GenericArg < ' tcx > > ,
197+ visited : & mut SsoHashSet < GenericArg < ' tcx > > ,
198198) {
199199 for child in parent. walk_shallow ( visited) {
200200 match child. unpack ( ) {
0 commit comments