Make sure Session.plugin_attributes is only used on one thread

This commit is contained in:
John Kåre Alsaker 2018-04-01 08:25:43 +02:00
parent 0e51d48324
commit 046af1c710

View file

@ -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`
@ -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(),