File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
compiler/rustc_data_structures/src Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 4141//! [^2] `MTLockRef` is a typedef.
4242
4343pub use crate :: marker:: * ;
44+ use parking_lot:: Mutex ;
4445use std:: any:: Any ;
4546use std:: collections:: HashMap ;
4647use std:: hash:: { BuildHasher , Hash } ;
@@ -110,13 +111,13 @@ pub use mode::{is_dyn_thread_safe, set_dyn_thread_safe_mode};
110111/// continuing with unwinding. It's also used for the non-parallel code to ensure error message
111112/// output match the parallel compiler for testing purposes.
112113pub struct ParallelGuard {
113- panic : Lock < Option < Box < dyn Any + std:: marker:: Send + ' static > > > ,
114+ panic : Mutex < Option < Box < dyn Any + std:: marker:: Send + ' static > > > ,
114115}
115116
116117impl ParallelGuard {
117118 #[ inline]
118119 pub fn new ( ) -> Self {
119- ParallelGuard { panic : Lock :: new ( None ) }
120+ ParallelGuard { panic : Mutex :: new ( None ) }
120121 }
121122
122123 pub fn run < R > ( & self , f : impl FnOnce ( ) -> R ) -> Option < R > {
@@ -316,8 +317,6 @@ cfg_if! {
316317 }
317318 }
318319 } else {
319- use parking_lot:: Mutex ;
320-
321320 pub use std:: marker:: Send as Send ;
322321 pub use std:: marker:: Sync as Sync ;
323322
You can’t perform that action at this time.
0 commit comments