@@ -4,7 +4,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet};
4
4
use rustc_hir:: def_id:: { CrateNum , DefId } ;
5
5
use rustc_middle:: middle:: privacy:: AccessLevels ;
6
6
use rustc_middle:: ty:: { self , TyCtxt } ;
7
- use rustc_span:: { sym , Symbol } ;
7
+ use rustc_span:: Symbol ;
8
8
9
9
use crate :: clean:: { self , types:: ExternalLocation , ExternalCrate , ItemId , PrimitiveType } ;
10
10
use crate :: core:: DocContext ;
@@ -62,7 +62,7 @@ pub(crate) struct Cache {
62
62
/// Implementations of a crate should inherit the documentation of the
63
63
/// parent trait if no extra documentation is specified, and default methods
64
64
/// should show up in documentation about trait implementations.
65
- pub ( crate ) traits : FxHashMap < DefId , clean:: TraitWithExtraInfo > ,
65
+ pub ( crate ) traits : FxHashMap < DefId , clean:: Trait > ,
66
66
67
67
/// When rendering traits, it's often useful to be able to list all
68
68
/// implementors of the trait, and this mapping is exactly, that: a mapping
@@ -225,12 +225,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
225
225
// Propagate a trait method's documentation to all implementors of the
226
226
// trait.
227
227
if let clean:: TraitItem ( ref t) = * item. kind {
228
- self . cache . traits . entry ( item. item_id . expect_def_id ( ) ) . or_insert_with ( || {
229
- clean:: TraitWithExtraInfo {
230
- trait_ : * t. clone ( ) ,
231
- is_notable : item. attrs . has_doc_flag ( sym:: notable_trait) ,
232
- }
233
- } ) ;
228
+ self . cache . traits . entry ( item. item_id . expect_def_id ( ) ) . or_insert_with ( || ( * * t) . clone ( ) ) ;
234
229
}
235
230
236
231
// Collect all the implementors of traits.
0 commit comments