Skip to content

Commit 6be2857

Browse files
Replace Arc with Rc around external_traits
1 parent c574810 commit 6be2857

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pub struct Crate {
131131
pub primitives: Vec<(DefId, PrimitiveType, Attributes)>,
132132
// These are later on moved into `CACHEKEY`, leaving the map empty.
133133
// Only here so that they can be filtered through the rustdoc passes.
134-
pub external_traits: Arc<RefCell<FxHashMap<DefId, Trait>>>,
134+
pub external_traits: Rc<RefCell<FxHashMap<DefId, Trait>>>,
135135
pub masked_crates: FxHashSet<CrateNum>,
136136
}
137137

src/librustdoc/core.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ use errors::emitter::{Emitter, EmitterWriter};
2626
use std::cell::RefCell;
2727
use std::mem;
2828
use rustc_data_structures::sync::{self, Lrc};
29-
use std::sync::Arc;
3029
use std::rc::Rc;
3130

3231
use crate::config::{Options as RustdocOptions, RenderOptions};
@@ -49,7 +48,7 @@ pub struct DocContext<'tcx> {
4948
/// Later on moved into `html::render::CACHE_KEY`
5049
pub renderinfo: RefCell<RenderInfo>,
5150
/// Later on moved through `clean::Crate` into `html::render::CACHE_KEY`
52-
pub external_traits: Arc<RefCell<FxHashMap<DefId, clean::Trait>>>,
51+
pub external_traits: Rc<RefCell<FxHashMap<DefId, clean::Trait>>>,
5352
/// Used while populating `external_traits` to ensure we don't process the same trait twice at
5453
/// the same time.
5554
pub active_extern_traits: RefCell<Vec<DefId>>,

0 commit comments

Comments
 (0)