diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 2d7a256a369f7..2993234f26625 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(),