From e5fc06da8a3b91c8787a6395722e551550161cff Mon Sep 17 00:00:00 2001 From: =?utf8?q?John=20K=C3=A5re=20Alsaker?= Date: Sun, 1 Apr 2018 08:22:40 +0200 Subject: [PATCH] Make one_time_diagnostics thread-safe --- src/librustc/session/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 2d7a256a369..2993234f266 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -89,7 +89,7 @@ pub struct Session { /// Set of (DiagnosticId, Option, message) tuples tracking /// (sub)diagnostics that have been set once, but should not be set again, /// in order to avoid redundantly verbose output (Issue #24690, #44953). - pub one_time_diagnostics: RefCell, String)>>, + pub one_time_diagnostics: Lock, String)>>, pub plugin_llvm_passes: OneThread>>, pub plugin_attributes: OneThread>>, pub crate_types: Once>, @@ -1091,7 +1091,7 @@ pub fn build_session_( working_dir, lint_store: RwLock::new(lint::LintStore::new()), buffered_lints: Lock::new(Some(lint::LintBuffer::new())), - one_time_diagnostics: RefCell::new(FxHashSet()), + one_time_diagnostics: Lock::new(FxHashSet()), plugin_llvm_passes: OneThread::new(RefCell::new(Vec::new())), plugin_attributes: OneThread::new(RefCell::new(Vec::new())), crate_types: Once::new(), -- 2.44.0