File tree Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Expand file tree Collapse file tree 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(
176176 match module. define_function ( codegened_func. func_id , context) {
177177 Ok ( ( ) ) => { }
178178 Err ( ModuleError :: Compilation ( CodegenError :: ImplLimitExceeded ) ) => {
179- let handler = rustc_session:: EarlyErrorHandler :: new (
179+ let early_dcx = rustc_session:: EarlyDiagCtxt :: new (
180180 rustc_session:: config:: ErrorOutputType :: default ( ) ,
181181 ) ;
182- handler . early_error ( format ! (
182+ early_dcx . early_error ( format ! (
183183 "backend implementation limit exceeded while compiling {name}" ,
184184 name = codegened_func. symbol_name
185185 ) ) ;
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ impl ConcurrencyLimiter {
4646 }
4747 }
4848
49- pub ( super ) fn acquire ( & mut self , handler : & rustc_errors:: Handler ) -> ConcurrencyLimiterToken {
49+ pub ( super ) fn acquire ( & mut self , dcx : & rustc_errors:: DiagCtxt ) -> ConcurrencyLimiterToken {
5050 let mut state = self . state . lock ( ) . unwrap ( ) ;
5151 loop {
5252 state. assert_invariants ( ) ;
@@ -64,7 +64,7 @@ impl ConcurrencyLimiter {
6464 // Make sure to drop the mutex guard first to prevent poisoning the mutex.
6565 drop ( state) ;
6666 if let Some ( err) = err {
67- handler . fatal ( err) ;
67+ dcx . fatal ( err) ;
6868 } else {
6969 // The error was already emitted, but compilation continued. Raise a silent
7070 // fatal error.
Original file line number Diff line number Diff line change @@ -422,7 +422,7 @@ pub(crate) fn run_aot(
422422 backend_config. clone ( ) ,
423423 global_asm_config. clone ( ) ,
424424 cgu. name ( ) ,
425- concurrency_limiter. acquire ( tcx. sess . diagnostic ( ) ) ,
425+ concurrency_limiter. acquire ( tcx. sess . dcx ( ) ) ,
426426 ) ,
427427 module_codegen,
428428 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(
231231 let res = std:: fs:: File :: create ( clif_file_name) . and_then ( |mut file| write ( & mut file) ) ;
232232 if let Err ( err) = res {
233233 // 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 ( ) ) ;
237236 handler. early_warn ( format ! ( "error writing ir file: {}" , err) ) ;
238237 }
239238}
You can’t perform that action at this time.
0 commit comments