@@ -2632,47 +2632,44 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
26322632 }
26332633 }
26342634 ty:: Dynamic ( ref obj, ref reg) => {
2635- if let Some ( principal) = obj. principal ( ) {
2636- let did = principal. def_id ( ) ;
2635+ let principal = obj. principal ( ) ;
2636+ let did = principal. def_id ( ) ;
2637+ inline:: record_extern_fqn ( cx, did, TypeKind :: Trait ) ;
2638+
2639+ let mut typarams = vec ! [ ] ;
2640+ reg. clean ( cx) . map ( |b| typarams. push ( GenericBound :: Outlives ( b) ) ) ;
2641+ for did in obj. auto_traits ( ) {
2642+ let empty = cx. tcx . intern_substs ( & [ ] ) ;
2643+ let path = external_path ( cx, & cx. tcx . item_name ( did) . as_str ( ) ,
2644+ Some ( did) , false , vec ! [ ] , empty) ;
26372645 inline:: record_extern_fqn ( cx, did, TypeKind :: Trait ) ;
2646+ let bound = GenericBound :: TraitBound ( PolyTrait {
2647+ trait_ : ResolvedPath {
2648+ path,
2649+ typarams : None ,
2650+ did,
2651+ is_generic : false ,
2652+ } ,
2653+ generic_params : Vec :: new ( ) ,
2654+ } , hir:: TraitBoundModifier :: None ) ;
2655+ typarams. push ( bound) ;
2656+ }
26382657
2639- let mut typarams = vec ! [ ] ;
2640- reg. clean ( cx) . map ( |b| typarams. push ( GenericBound :: Outlives ( b) ) ) ;
2641- for did in obj. auto_traits ( ) {
2642- let empty = cx. tcx . intern_substs ( & [ ] ) ;
2643- let path = external_path ( cx, & cx. tcx . item_name ( did) . as_str ( ) ,
2644- Some ( did) , false , vec ! [ ] , empty) ;
2645- inline:: record_extern_fqn ( cx, did, TypeKind :: Trait ) ;
2646- let bound = GenericBound :: TraitBound ( PolyTrait {
2647- trait_ : ResolvedPath {
2648- path,
2649- typarams : None ,
2650- did,
2651- is_generic : false ,
2652- } ,
2653- generic_params : Vec :: new ( ) ,
2654- } , hir:: TraitBoundModifier :: None ) ;
2655- typarams. push ( bound) ;
2656- }
2657-
2658- let mut bindings = vec ! [ ] ;
2659- for pb in obj. projection_bounds ( ) {
2660- bindings. push ( TypeBinding {
2661- name : cx. tcx . associated_item ( pb. item_def_id ( ) ) . ident . name . clean ( cx) ,
2662- ty : pb. skip_binder ( ) . ty . clean ( cx)
2663- } ) ;
2664- }
2658+ let mut bindings = vec ! [ ] ;
2659+ for pb in obj. projection_bounds ( ) {
2660+ bindings. push ( TypeBinding {
2661+ name : cx. tcx . associated_item ( pb. item_def_id ( ) ) . ident . name . clean ( cx) ,
2662+ ty : pb. skip_binder ( ) . ty . clean ( cx)
2663+ } ) ;
2664+ }
26652665
2666- let path = external_path ( cx, & cx. tcx . item_name ( did) . as_str ( ) , Some ( did) ,
2667- false , bindings, principal. skip_binder ( ) . substs ) ;
2668- ResolvedPath {
2669- path,
2670- typarams : Some ( typarams) ,
2671- did,
2672- is_generic : false ,
2673- }
2674- } else {
2675- Never
2666+ let path = external_path ( cx, & cx. tcx . item_name ( did) . as_str ( ) , Some ( did) ,
2667+ false , bindings, principal. skip_binder ( ) . substs ) ;
2668+ ResolvedPath {
2669+ path,
2670+ typarams : Some ( typarams) ,
2671+ did,
2672+ is_generic : false ,
26762673 }
26772674 }
26782675 ty:: Tuple ( ref t) => Tuple ( t. clean ( cx) ) ,
0 commit comments