Skip to content

Commit

Permalink
Replace Arc with Rc around external_traits
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Aug 11, 2019
1 parent c574810 commit 6be2857
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/clean/mod.rs
Expand Up @@ -131,7 +131,7 @@ pub struct Crate {
pub primitives: Vec<(DefId, PrimitiveType, Attributes)>,
// These are later on moved into `CACHEKEY`, leaving the map empty.
// Only here so that they can be filtered through the rustdoc passes.
pub external_traits: Arc<RefCell<FxHashMap<DefId, Trait>>>,
pub external_traits: Rc<RefCell<FxHashMap<DefId, Trait>>>,
pub masked_crates: FxHashSet<CrateNum>,
}

Expand Down
3 changes: 1 addition & 2 deletions src/librustdoc/core.rs
Expand Up @@ -26,7 +26,6 @@ use errors::emitter::{Emitter, EmitterWriter};
use std::cell::RefCell;
use std::mem;
use rustc_data_structures::sync::{self, Lrc};
use std::sync::Arc;
use std::rc::Rc;

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

0 comments on commit 6be2857

Please sign in to comment.