Skip to content

Commit afef64c

Browse files
committed
Use a dedicated type instead of a reference for the diagnostic context
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
1 parent 54aa510 commit afef64c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/concurrency_limiter.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::sync::{Arc, Condvar, Mutex};
22

33
use jobserver::HelperThread;
4+
use rustc_errors::DiagCtxtHandle;
45
use rustc_session::Session;
56

67
// FIXME don't panic when a worker thread panics
@@ -46,7 +47,7 @@ impl ConcurrencyLimiter {
4647
}
4748
}
4849

49-
pub(super) fn acquire(&self, dcx: &rustc_errors::DiagCtxt) -> ConcurrencyLimiterToken {
50+
pub(super) fn acquire(&self, dcx: DiagCtxtHandle<'_>) -> ConcurrencyLimiterToken {
5051
let mut state = self.state.lock().unwrap();
5152
loop {
5253
state.assert_invariants();

0 commit comments

Comments
 (0)