Skip to content

Commit

Permalink
Make sure Session.plugin_attributes is only used on one thread
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Apr 10, 2018
1 parent 0e51d48 commit 046af1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub struct Session {
/// in order to avoid redundantly verbose output (Issue #24690, #44953).
pub one_time_diagnostics: RefCell<FxHashSet<(DiagnosticMessageId, Option<Span>, String)>>,
pub plugin_llvm_passes: OneThread<RefCell<Vec<String>>>,
pub plugin_attributes: RefCell<Vec<(String, AttributeType)>>,
pub plugin_attributes: OneThread<RefCell<Vec<(String, AttributeType)>>>,
pub crate_types: RefCell<Vec<config::CrateType>>,
pub dependency_formats: RefCell<dependency_format::Dependencies>,
/// The crate_disambiguator is constructed out of all the `-C metadata`
Expand Down Expand Up @@ -1095,7 +1095,7 @@ pub fn build_session_(
buffered_lints: OneThread::new(RefCell::new(Some(lint::LintBuffer::new()))),
one_time_diagnostics: RefCell::new(FxHashSet()),
plugin_llvm_passes: OneThread::new(RefCell::new(Vec::new())),
plugin_attributes: RefCell::new(Vec::new()),
plugin_attributes: OneThread::new(RefCell::new(Vec::new())),
crate_types: RefCell::new(Vec::new()),
dependency_formats: RefCell::new(FxHashMap()),
crate_disambiguator: Once::new(),
Expand Down

0 comments on commit 046af1c

Please sign in to comment.