@@ -4,7 +4,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet};
44use rustc_hir:: def_id:: { CrateNum , DefId } ;
55use rustc_middle:: middle:: privacy:: AccessLevels ;
66use rustc_middle:: ty:: { self , TyCtxt } ;
7- use rustc_span:: { sym , Symbol } ;
7+ use rustc_span:: Symbol ;
88
99use crate :: clean:: { self , types:: ExternalLocation , ExternalCrate , ItemId , PrimitiveType } ;
1010use crate :: core:: DocContext ;
@@ -62,7 +62,7 @@ pub(crate) struct Cache {
6262 /// Implementations of a crate should inherit the documentation of the
6363 /// parent trait if no extra documentation is specified, and default methods
6464 /// should show up in documentation about trait implementations.
65- pub ( crate ) traits : FxHashMap < DefId , clean:: TraitWithExtraInfo > ,
65+ pub ( crate ) traits : FxHashMap < DefId , clean:: Trait > ,
6666
6767 /// When rendering traits, it's often useful to be able to list all
6868 /// implementors of the trait, and this mapping is exactly, that: a mapping
@@ -225,12 +225,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
225225 // Propagate a trait method's documentation to all implementors of the
226226 // trait.
227227 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 ( ) ) ;
234229 }
235230
236231 // Collect all the implementors of traits.
0 commit comments