File tree 4 files changed +7
-8
lines changed
4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -176,10 +176,10 @@ pub(crate) fn compile_fn(
176
176
match module. define_function ( codegened_func. func_id , context) {
177
177
Ok ( ( ) ) => { }
178
178
Err ( ModuleError :: Compilation ( CodegenError :: ImplLimitExceeded ) ) => {
179
- let handler = rustc_session:: EarlyErrorHandler :: new (
179
+ let early_dcx = rustc_session:: EarlyDiagCtxt :: new (
180
180
rustc_session:: config:: ErrorOutputType :: default ( ) ,
181
181
) ;
182
- handler . early_error ( format ! (
182
+ early_dcx . early_error ( format ! (
183
183
"backend implementation limit exceeded while compiling {name}" ,
184
184
name = codegened_func. symbol_name
185
185
) ) ;
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ impl ConcurrencyLimiter {
46
46
}
47
47
}
48
48
49
- pub ( super ) fn acquire ( & mut self , handler : & rustc_errors:: Handler ) -> ConcurrencyLimiterToken {
49
+ pub ( super ) fn acquire ( & mut self , dcx : & rustc_errors:: DiagCtxt ) -> ConcurrencyLimiterToken {
50
50
let mut state = self . state . lock ( ) . unwrap ( ) ;
51
51
loop {
52
52
state. assert_invariants ( ) ;
@@ -64,7 +64,7 @@ impl ConcurrencyLimiter {
64
64
// Make sure to drop the mutex guard first to prevent poisoning the mutex.
65
65
drop ( state) ;
66
66
if let Some ( err) = err {
67
- handler . fatal ( err) ;
67
+ dcx . fatal ( err) ;
68
68
} else {
69
69
// The error was already emitted, but compilation continued. Raise a silent
70
70
// fatal error.
Original file line number Diff line number Diff line change @@ -422,7 +422,7 @@ pub(crate) fn run_aot(
422
422
backend_config. clone ( ) ,
423
423
global_asm_config. clone ( ) ,
424
424
cgu. name ( ) ,
425
- concurrency_limiter. acquire ( tcx. sess . diagnostic ( ) ) ,
425
+ concurrency_limiter. acquire ( tcx. sess . dcx ( ) ) ,
426
426
) ,
427
427
module_codegen,
428
428
Some ( rustc_middle:: dep_graph:: hash_result) ,
Original file line number Diff line number Diff line change @@ -231,9 +231,8 @@ pub(crate) fn write_ir_file(
231
231
let res = std:: fs:: File :: create ( clif_file_name) . and_then ( |mut file| write ( & mut file) ) ;
232
232
if let Err ( err) = res {
233
233
// Using early_warn as no Session is available here
234
- let handler = rustc_session:: EarlyErrorHandler :: new (
235
- rustc_session:: config:: ErrorOutputType :: default ( ) ,
236
- ) ;
234
+ let handler =
235
+ rustc_session:: EarlyDiagCtxt :: new ( rustc_session:: config:: ErrorOutputType :: default ( ) ) ;
237
236
handler. early_warn ( format ! ( "error writing ir file: {}" , err) ) ;
238
237
}
239
238
}
You can’t perform that action at this time.
0 commit comments