File tree 1 file changed +3
-4
lines changed
compiler/rustc_data_structures/src
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 41
41
//! [^2] `MTLockRef` is a typedef.
42
42
43
43
pub use crate :: marker:: * ;
44
+ use parking_lot:: Mutex ;
44
45
use std:: any:: Any ;
45
46
use std:: collections:: HashMap ;
46
47
use std:: hash:: { BuildHasher , Hash } ;
@@ -110,13 +111,13 @@ pub use mode::{is_dyn_thread_safe, set_dyn_thread_safe_mode};
110
111
/// continuing with unwinding. It's also used for the non-parallel code to ensure error message
111
112
/// output match the parallel compiler for testing purposes.
112
113
pub struct ParallelGuard {
113
- panic : Lock < Option < Box < dyn Any + std:: marker:: Send + ' static > > > ,
114
+ panic : Mutex < Option < Box < dyn Any + std:: marker:: Send + ' static > > > ,
114
115
}
115
116
116
117
impl ParallelGuard {
117
118
#[ inline]
118
119
pub fn new ( ) -> Self {
119
- ParallelGuard { panic : Lock :: new ( None ) }
120
+ ParallelGuard { panic : Mutex :: new ( None ) }
120
121
}
121
122
122
123
pub fn run < R > ( & self , f : impl FnOnce ( ) -> R ) -> Option < R > {
@@ -316,8 +317,6 @@ cfg_if! {
316
317
}
317
318
}
318
319
} else {
319
- use parking_lot:: Mutex ;
320
-
321
320
pub use std:: marker:: Send as Send ;
322
321
pub use std:: marker:: Sync as Sync ;
323
322
You can’t perform that action at this time.
0 commit comments