File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -581,13 +581,11 @@ pub fn record_extern_trait(cx: &DocContext<'_>, did: DefId) {
581581 }
582582 }
583583
584- cx. active_extern_traits . borrow_mut ( ) . push ( did) ;
584+ cx. active_extern_traits . borrow_mut ( ) . insert ( did) ;
585585
586586 debug ! ( "record_extern_trait: {:?}" , did) ;
587587 let trait_ = build_external_trait ( cx, did) ;
588588
589- {
590- cx. external_traits . borrow_mut ( ) . insert ( did, trait_) ;
591- }
592- cx. active_extern_traits . borrow_mut ( ) . remove_item ( & did) ;
589+ cx. external_traits . borrow_mut ( ) . insert ( did, trait_) ;
590+ cx. active_extern_traits . borrow_mut ( ) . remove ( & did) ;
593591}
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ pub struct DocContext<'tcx> {
5151 pub external_traits : Rc < RefCell < FxHashMap < DefId , clean:: Trait > > > ,
5252 /// Used while populating `external_traits` to ensure we don't process the same trait twice at
5353 /// the same time.
54- pub active_extern_traits : RefCell < Vec < DefId > > ,
54+ pub active_extern_traits : RefCell < FxHashSet < DefId > > ,
5555 // The current set of type and lifetime substitutions,
5656 // for expanding type aliases at the HIR level:
5757
You can’t perform that action at this time.
0 commit comments