@@ -31,6 +31,7 @@ use rustc_typeck::hir_ty_to_ty;
31
31
32
32
use std:: assert_matches:: assert_matches;
33
33
use std:: collections:: hash_map:: Entry ;
34
+ use std:: collections:: BTreeMap ;
34
35
use std:: default:: Default ;
35
36
use std:: hash:: Hash ;
36
37
use std:: { mem, vec} ;
@@ -527,9 +528,6 @@ fn clean_ty_generics(
527
528
gens : & ty:: Generics ,
528
529
preds : ty:: GenericPredicates < ' tcx > ,
529
530
) -> Generics {
530
- use self :: WherePredicate as WP ;
531
- use std:: collections:: BTreeMap ;
532
-
533
531
// Don't populate `cx.impl_trait_bounds` before `clean`ning `where` clauses,
534
532
// since `Clean for ty::Predicate` would consume them.
535
533
let mut impl_trait = BTreeMap :: < ImplTraitParam , Vec < GenericBound > > :: default ( ) ;
@@ -650,7 +648,7 @@ fn clean_ty_generics(
650
648
// handled in cleaning associated types
651
649
let mut sized_params = FxHashSet :: default ( ) ;
652
650
where_predicates. retain ( |pred| match * pred {
653
- WP :: BoundPredicate { ty : Generic ( ref g) , ref bounds, .. } => {
651
+ WherePredicate :: BoundPredicate { ty : Generic ( ref g) , ref bounds, .. } => {
654
652
if bounds. iter ( ) . any ( |b| b. is_sized_bound ( cx) ) {
655
653
sized_params. insert ( * g) ;
656
654
false
@@ -667,7 +665,7 @@ fn clean_ty_generics(
667
665
if matches ! ( tp. kind, types:: GenericParamDefKind :: Type { .. } )
668
666
&& !sized_params. contains ( & tp. name )
669
667
{
670
- where_predicates. push ( WP :: BoundPredicate {
668
+ where_predicates. push ( WherePredicate :: BoundPredicate {
671
669
ty : Type :: Generic ( tp. name ) ,
672
670
bounds : vec ! [ GenericBound :: maybe_sized( cx) ] ,
673
671
bound_params : Vec :: new ( ) ,
0 commit comments