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 @@ -409,9 +409,7 @@ fn run_compiler(
409
409
Ok ( ( ) )
410
410
} ) ?;
411
411
412
- // Make sure the `write_dep_info` query is run for its side
413
- // effects of writing the dep-info and reporting errors.
414
- queries. global_ctxt( ) ?. enter( |tcx| tcx. write_dep_info( ( ) ) ) ;
412
+ queries. write_dep_info( ) ?;
415
413
} else {
416
414
let krate = queries. parse( ) ?;
417
415
pretty:: print(
@@ -444,9 +442,7 @@ fn run_compiler(
444
442
return early_exit( ) ;
445
443
}
446
444
447
- // Make sure the `write_dep_info` query is run for its side
448
- // effects of writing the dep-info and reporting errors.
449
- queries. global_ctxt( ) ?. enter( |tcx| tcx. write_dep_info( ( ) ) ) ;
445
+ queries. write_dep_info( ) ?;
450
446
451
447
if sess. opts. output_types. contains_key( & OutputType :: DepInfo )
452
448
&& 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
pub fn ongoing_codegen ( & ' tcx self ) -> Result < Box < dyn Any > > {
180
187
self . global_ctxt ( ) ?. enter ( |tcx| {
181
188
// Don't do code generation if there were any errors
Original file line number Diff line number Diff line change @@ -1910,11 +1910,6 @@ rustc_queries! {
1910
1910
arena_cache
1911
1911
}
1912
1912
1913
- /// Write the dep-info file.
1914
- query write_dep_info( _: ( ) ) -> ( ) {
1915
- desc { "writing the dep-info file" }
1916
- }
1917
-
1918
1913
/// Do not call this query directly: invoke `normalize` instead.
1919
1914
query normalize_projection_ty(
1920
1915
goal: CanonicalProjectionGoal <' tcx>
You can’t perform that action at this time.
0 commit comments