@@ -31,6 +31,7 @@ use rustc_typeck::hir_ty_to_ty;
3131
3232use std:: assert_matches:: assert_matches;
3333use std:: collections:: hash_map:: Entry ;
34+ use std:: collections:: BTreeMap ;
3435use std:: default:: Default ;
3536use std:: hash:: Hash ;
3637use std:: { mem, vec} ;
@@ -527,9 +528,6 @@ fn clean_ty_generics(
527528 gens : & ty:: Generics ,
528529 preds : ty:: GenericPredicates < ' tcx > ,
529530) -> Generics {
530- use self :: WherePredicate as WP ;
531- use std:: collections:: BTreeMap ;
532-
533531 // Don't populate `cx.impl_trait_bounds` before `clean`ning `where` clauses,
534532 // since `Clean for ty::Predicate` would consume them.
535533 let mut impl_trait = BTreeMap :: < ImplTraitParam , Vec < GenericBound > > :: default ( ) ;
@@ -650,7 +648,7 @@ fn clean_ty_generics(
650648 // handled in cleaning associated types
651649 let mut sized_params = FxHashSet :: default ( ) ;
652650 where_predicates. retain ( |pred| match * pred {
653- WP :: BoundPredicate { ty : Generic ( ref g) , ref bounds, .. } => {
651+ WherePredicate :: BoundPredicate { ty : Generic ( ref g) , ref bounds, .. } => {
654652 if bounds. iter ( ) . any ( |b| b. is_sized_bound ( cx) ) {
655653 sized_params. insert ( * g) ;
656654 false
@@ -667,7 +665,7 @@ fn clean_ty_generics(
667665 if matches ! ( tp. kind, types:: GenericParamDefKind :: Type { .. } )
668666 && !sized_params. contains ( & tp. name )
669667 {
670- where_predicates. push ( WP :: BoundPredicate {
668+ where_predicates. push ( WherePredicate :: BoundPredicate {
671669 ty : Type :: Generic ( tp. name ) ,
672670 bounds : vec ! [ GenericBound :: maybe_sized( cx) ] ,
673671 bound_params : Vec :: new ( ) ,
0 commit comments