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 @@ -403,9 +403,7 @@ fn run_compiler(
403
403
Ok ( ( ) )
404
404
} ) ?;
405
405
406
- // Make sure the `write_dep_info` query is run for its side
407
- // effects of writing the dep-info and reporting errors.
408
- queries. global_ctxt( ) ?. enter( |tcx| tcx. write_dep_info( ( ) ) ) ;
406
+ queries. write_dep_info( ) ?;
409
407
} else {
410
408
let krate = queries. parse( ) ?;
411
409
pretty:: print(
@@ -433,9 +431,7 @@ fn run_compiler(
433
431
return early_exit( ) ;
434
432
}
435
433
436
- // Make sure the `write_dep_info` query is run for its side
437
- // effects of writing the dep-info and reporting errors.
438
- queries. global_ctxt( ) ?. enter( |tcx| tcx. write_dep_info( ( ) ) ) ;
434
+ queries. write_dep_info( ) ?;
439
435
440
436
if sess. opts. output_types. contains_key( & OutputType :: DepInfo )
441
437
&& 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 @@ -171,6 +171,13 @@ impl<'tcx> Queries<'tcx> {
171
171
} )
172
172
}
173
173
174
+ pub fn write_dep_info ( & ' tcx self ) -> Result < ( ) > {
175
+ self . global_ctxt ( ) ?. enter ( |tcx| {
176
+ passes:: write_dep_info ( tcx) ;
177
+ } ) ;
178
+ Ok ( ( ) )
179
+ }
180
+
174
181
/// Check for the `#[rustc_error]` annotation, which forces an error in codegen. This is used
175
182
/// to write UI tests that actually test that compilation succeeds without reporting
176
183
/// an error.
Original file line number Diff line number Diff line change @@ -1917,11 +1917,6 @@ rustc_queries! {
1917
1917
arena_cache
1918
1918
}
1919
1919
1920
- /// Write the dep-info file.
1921
- query write_dep_info( _: ( ) ) -> ( ) {
1922
- desc { "writing the dep-info file" }
1923
- }
1924
-
1925
1920
/// Do not call this query directly: invoke `normalize` instead.
1926
1921
query normalize_projection_ty(
1927
1922
goal: CanonicalProjectionGoal <' tcx>
You can’t perform that action at this time.
0 commit comments