File tree 4 files changed +10
-13
lines changed
4 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -401,9 +401,7 @@ fn run_compiler(
401
401
Ok ( ( ) )
402
402
} ) ?;
403
403
404
- // Make sure the `write_dep_info` query is run for its side
405
- // effects of writing the dep-info and reporting errors.
406
- queries. global_ctxt( ) ?. enter( |tcx| tcx. write_dep_info( ( ) ) ) ;
404
+ queries. write_dep_info( ) ?;
407
405
} else {
408
406
let krate = queries. parse( ) ?;
409
407
pretty:: print(
@@ -431,9 +429,7 @@ fn run_compiler(
431
429
return early_exit( ) ;
432
430
}
433
431
434
- // Make sure the `write_dep_info` query is run for its side
435
- // effects of writing the dep-info and reporting errors.
436
- queries. global_ctxt( ) ?. enter( |tcx| tcx. write_dep_info( ( ) ) ) ;
432
+ queries. write_dep_info( ) ?;
437
433
438
434
if sess. opts. output_types. contains_key( & OutputType :: DepInfo )
439
435
&& sess. opts. output_types. len( ) == 1
Original file line number Diff line number Diff line change @@ -553,7 +553,7 @@ fn resolver_for_lowering<'tcx>(
553
553
tcx. arena . alloc ( Steal :: new ( ( untracked_resolver_for_lowering, Lrc :: new ( krate) ) ) )
554
554
}
555
555
556
- fn write_dep_info ( tcx : TyCtxt < ' _ > , ( ) : ( ) ) {
556
+ pub ( crate ) fn write_dep_info ( tcx : TyCtxt < ' _ > ) {
557
557
// Make sure name resolution and macro expansion is run for
558
558
// the side-effect of providing a complete set of all
559
559
// accessed files and env vars.
@@ -606,7 +606,6 @@ pub static DEFAULT_QUERY_PROVIDERS: LazyLock<Providers> = LazyLock::new(|| {
606
606
let providers = & mut Providers :: default ( ) ;
607
607
providers. analysis = analysis;
608
608
providers. hir_crate = rustc_ast_lowering:: lower_to_hir;
609
- providers. write_dep_info = write_dep_info;
610
609
providers. resolver_for_lowering = resolver_for_lowering;
611
610
providers. early_lint_checks = early_lint_checks;
612
611
proc_macro_decls:: provide ( providers) ;
Original file line number Diff line number Diff line change @@ -176,6 +176,13 @@ impl<'tcx> Queries<'tcx> {
176
176
} )
177
177
}
178
178
179
+ pub fn write_dep_info ( & ' tcx self ) -> Result < ( ) > {
180
+ self . global_ctxt ( ) ?. enter ( |tcx| {
181
+ passes:: write_dep_info ( tcx) ;
182
+ } ) ;
183
+ Ok ( ( ) )
184
+ }
185
+
179
186
/// Check for the `#[rustc_error]` annotation, which forces an error in codegen. This is used
180
187
/// to write UI tests that actually test that compilation succeeds without reporting
181
188
/// an error.
Original file line number Diff line number Diff line change @@ -1916,11 +1916,6 @@ rustc_queries! {
1916
1916
arena_cache
1917
1917
}
1918
1918
1919
- /// Write the dep-info file.
1920
- query write_dep_info( _: ( ) ) -> ( ) {
1921
- desc { "writing the dep-info file" }
1922
- }
1923
-
1924
1919
/// Do not call this query directly: invoke `normalize` instead.
1925
1920
query normalize_projection_ty(
1926
1921
goal: CanonicalProjectionGoal <' tcx>
You can’t perform that action at this time.
0 commit comments