Skip to content

Commit 0e51d48

Browse files
committed
Make sure Session.plugin_llvm_passes is only used on one thread
1 parent 7d33d1a commit 0e51d48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc/session/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub struct Session {
9090
/// (sub)diagnostics that have been set once, but should not be set again,
9191
/// in order to avoid redundantly verbose output (Issue #24690, #44953).
9292
pub one_time_diagnostics: RefCell<FxHashSet<(DiagnosticMessageId, Option<Span>, String)>>,
93-
pub plugin_llvm_passes: RefCell<Vec<String>>,
93+
pub plugin_llvm_passes: OneThread<RefCell<Vec<String>>>,
9494
pub plugin_attributes: RefCell<Vec<(String, AttributeType)>>,
9595
pub crate_types: RefCell<Vec<config::CrateType>>,
9696
pub dependency_formats: RefCell<dependency_format::Dependencies>,
@@ -1094,7 +1094,7 @@ pub fn build_session_(
10941094
lint_store: OneThread::new(RefCell::new(lint::LintStore::new())),
10951095
buffered_lints: OneThread::new(RefCell::new(Some(lint::LintBuffer::new()))),
10961096
one_time_diagnostics: RefCell::new(FxHashSet()),
1097-
plugin_llvm_passes: RefCell::new(Vec::new()),
1097+
plugin_llvm_passes: OneThread::new(RefCell::new(Vec::new())),
10981098
plugin_attributes: RefCell::new(Vec::new()),
10991099
crate_types: RefCell::new(Vec::new()),
11001100
dependency_formats: RefCell::new(FxHashMap()),

0 commit comments

Comments
 (0)