From 9017d46901700a4b877f47b2c715841557b388a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20K=C3=A5re=20Alsaker?= Date: Tue, 9 Apr 2019 10:19:53 +0200 Subject: [PATCH] Make trait_methods_not_found use a lock --- 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 2f3df32945ceb..9cd6c30e272f5 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -166,7 +166,7 @@ pub struct Session { pub driver_lint_caps: FxHashMap, /// `Span`s of trait methods that weren't found to avoid emitting object safety errors - pub trait_methods_not_found: OneThread>>, + pub trait_methods_not_found: Lock>, } pub struct PerfStats { @@ -1236,7 +1236,7 @@ fn build_session_( has_global_allocator: Once::new(), has_panic_handler: Once::new(), driver_lint_caps, - trait_methods_not_found: OneThread::new(RefCell::new(Default::default())), + trait_methods_not_found: Lock::new(Default::default()), }; validate_commandline_args_with_session_available(&sess);