@@ -576,9 +576,9 @@ impl Clean<Item> for doctree::Module {
576
576
let mut items: Vec < Item > = vec ! [ ] ;
577
577
items. extend ( self . extern_crates . iter ( ) . map ( |x| x. clean ( cx) ) ) ;
578
578
items. extend ( self . imports . iter ( ) . flat_map ( |x| x. clean ( cx) ) ) ;
579
- items. extend ( self . structs . iter ( ) . flat_map ( |x| x. clean ( cx) ) ) ;
580
- items. extend ( self . unions . iter ( ) . flat_map ( |x| x. clean ( cx) ) ) ;
581
- items. extend ( self . enums . iter ( ) . flat_map ( |x| x. clean ( cx) ) ) ;
579
+ items. extend ( self . structs . iter ( ) . map ( |x| x. clean ( cx) ) ) ;
580
+ items. extend ( self . unions . iter ( ) . map ( |x| x. clean ( cx) ) ) ;
581
+ items. extend ( self . enums . iter ( ) . map ( |x| x. clean ( cx) ) ) ;
582
582
items. extend ( self . fns . iter ( ) . map ( |x| x. clean ( cx) ) ) ;
583
583
items. extend ( self . foreigns . iter ( ) . flat_map ( |x| x. clean ( cx) ) ) ;
584
584
items. extend ( self . mods . iter ( ) . map ( |x| x. clean ( cx) ) ) ;
@@ -2813,14 +2813,10 @@ pub struct Union {
2813
2813
pub fields_stripped : bool ,
2814
2814
}
2815
2815
2816
- impl Clean < Vec < Item > > for doctree:: Struct {
2817
- fn clean ( & self , cx : & DocContext ) -> Vec < Item > {
2818
- let name = self . name . clean ( cx) ;
2819
- let mut ret = get_auto_traits_with_node_id ( cx, self . id , name. clone ( ) ) ;
2820
- ret. extend ( get_blanket_impls_with_node_id ( cx, self . id , name. clone ( ) ) ) ;
2821
-
2822
- ret. push ( Item {
2823
- name : Some ( name) ,
2816
+ impl Clean < Item > for doctree:: Struct {
2817
+ fn clean ( & self , cx : & DocContext ) -> Item {
2818
+ Item {
2819
+ name : Some ( self . name . clean ( cx) ) ,
2824
2820
attrs : self . attrs . clean ( cx) ,
2825
2821
source : self . whence . clean ( cx) ,
2826
2822
def_id : cx. tcx . hir . local_def_id ( self . id ) ,
@@ -2833,20 +2829,14 @@ impl Clean<Vec<Item>> for doctree::Struct {
2833
2829
fields : self . fields . clean ( cx) ,
2834
2830
fields_stripped : false ,
2835
2831
} ) ,
2836
- } ) ;
2837
-
2838
- ret
2832
+ }
2839
2833
}
2840
2834
}
2841
2835
2842
- impl Clean < Vec < Item > > for doctree:: Union {
2843
- fn clean ( & self , cx : & DocContext ) -> Vec < Item > {
2844
- let name = self . name . clean ( cx) ;
2845
- let mut ret = get_auto_traits_with_node_id ( cx, self . id , name. clone ( ) ) ;
2846
- ret. extend ( get_blanket_impls_with_node_id ( cx, self . id , name. clone ( ) ) ) ;
2847
-
2848
- ret. push ( Item {
2849
- name : Some ( name) ,
2836
+ impl Clean < Item > for doctree:: Union {
2837
+ fn clean ( & self , cx : & DocContext ) -> Item {
2838
+ Item {
2839
+ name : Some ( self . name . clean ( cx) ) ,
2850
2840
attrs : self . attrs . clean ( cx) ,
2851
2841
source : self . whence . clean ( cx) ,
2852
2842
def_id : cx. tcx . hir . local_def_id ( self . id ) ,
@@ -2859,9 +2849,7 @@ impl Clean<Vec<Item>> for doctree::Union {
2859
2849
fields : self . fields . clean ( cx) ,
2860
2850
fields_stripped : false ,
2861
2851
} ) ,
2862
- } ) ;
2863
-
2864
- ret
2852
+ }
2865
2853
}
2866
2854
}
2867
2855
@@ -2892,14 +2880,10 @@ pub struct Enum {
2892
2880
pub variants_stripped : bool ,
2893
2881
}
2894
2882
2895
- impl Clean < Vec < Item > > for doctree:: Enum {
2896
- fn clean ( & self , cx : & DocContext ) -> Vec < Item > {
2897
- let name = self . name . clean ( cx) ;
2898
- let mut ret = get_auto_traits_with_node_id ( cx, self . id , name. clone ( ) ) ;
2899
- ret. extend ( get_blanket_impls_with_node_id ( cx, self . id , name. clone ( ) ) ) ;
2900
-
2901
- ret. push ( Item {
2902
- name : Some ( name) ,
2883
+ impl Clean < Item > for doctree:: Enum {
2884
+ fn clean ( & self , cx : & DocContext ) -> Item {
2885
+ Item {
2886
+ name : Some ( self . name . clean ( cx) ) ,
2903
2887
attrs : self . attrs . clean ( cx) ,
2904
2888
source : self . whence . clean ( cx) ,
2905
2889
def_id : cx. tcx . hir . local_def_id ( self . id ) ,
@@ -2911,9 +2895,7 @@ impl Clean<Vec<Item>> for doctree::Enum {
2911
2895
generics : self . generics . clean ( cx) ,
2912
2896
variants_stripped : false ,
2913
2897
} ) ,
2914
- } ) ;
2915
-
2916
- ret
2898
+ }
2917
2899
}
2918
2900
}
2919
2901
@@ -3442,11 +3424,7 @@ fn build_deref_target_impls(cx: &DocContext,
3442
3424
let primitive = match * target {
3443
3425
ResolvedPath { did, .. } if did. is_local ( ) => continue ,
3444
3426
ResolvedPath { did, .. } => {
3445
- // We set the last parameter to false to avoid looking for auto-impls for traits
3446
- // and therefore avoid an ICE.
3447
- // The reason behind this is that auto-traits don't propagate through Deref so
3448
- // we're not supposed to synthesise impls for them.
3449
- ret. extend ( inline:: build_impls ( cx, did, false ) ) ;
3427
+ ret. extend ( inline:: build_impls ( cx, did) ) ;
3450
3428
continue
3451
3429
}
3452
3430
_ => match target. primitive_type ( ) {
0 commit comments