@@ -99,53 +99,6 @@ impl<'tcx> JsonRenderer<'tcx> {
99
99
} )
100
100
. unwrap_or_default ( )
101
101
}
102
-
103
- fn get_trait_items ( & mut self ) -> Vec < ( types:: Id , types:: Item ) > {
104
- debug ! ( "Adding foreign trait items" ) ;
105
- Rc :: clone ( & self . cache )
106
- . traits
107
- . iter ( )
108
- . filter_map ( |( & id, trait_item) | {
109
- // only need to synthesize items for external traits
110
- if !id. is_local ( ) {
111
- for item in & trait_item. items {
112
- trace ! ( "Adding subitem to {id:?}: {:?}" , item. item_id) ;
113
- self . item ( item. clone ( ) ) . unwrap ( ) ;
114
- }
115
- let item_id = from_item_id ( id. into ( ) , self . tcx ) ;
116
- Some ( (
117
- item_id. clone ( ) ,
118
- types:: Item {
119
- id : item_id,
120
- crate_id : id. krate . as_u32 ( ) ,
121
- name : self
122
- . cache
123
- . paths
124
- . get ( & id)
125
- . unwrap_or_else ( || {
126
- self . cache
127
- . external_paths
128
- . get ( & id)
129
- . expect ( "Trait should either be in local or external paths" )
130
- } )
131
- . 0
132
- . last ( )
133
- . map ( |s| s. to_string ( ) ) ,
134
- visibility : types:: Visibility :: Public ,
135
- inner : types:: ItemEnum :: Trait ( trait_item. clone ( ) . into_tcx ( self . tcx ) ) ,
136
- span : None ,
137
- docs : Default :: default ( ) ,
138
- links : Default :: default ( ) ,
139
- attrs : Default :: default ( ) ,
140
- deprecation : Default :: default ( ) ,
141
- } ,
142
- ) )
143
- } else {
144
- None
145
- }
146
- } )
147
- . collect ( )
148
- }
149
102
}
150
103
151
104
impl < ' tcx > FormatRenderer < ' tcx > for JsonRenderer < ' tcx > {
@@ -276,11 +229,7 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
276
229
277
230
let e = ExternalCrate { crate_num : LOCAL_CRATE } ;
278
231
279
- // FIXME(adotinthevoid): Remove this, as it's not consistent with not
280
- // inlining foreign items.
281
- let foreign_trait_items = self . get_trait_items ( ) ;
282
- let mut index = ( * self . index ) . clone ( ) . into_inner ( ) ;
283
- index. extend ( foreign_trait_items) ;
232
+ let index = ( * self . index ) . clone ( ) . into_inner ( ) ;
284
233
285
234
debug ! ( "Constructing Output" ) ;
286
235
// This needs to be the default HashMap for compatibility with the public interface for
0 commit comments