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 @@ -408,9 +408,7 @@ fn run_compiler(
408
408
Ok ( ( ) )
409
409
} ) ?;
410
410
411
- // Make sure the `write_dep_info` query is run for its side
412
- // effects of writing the dep-info and reporting errors.
413
- queries. global_ctxt( ) ?. enter( |tcx| tcx. write_dep_info( ( ) ) ) ;
411
+ queries. write_dep_info( ) ?;
414
412
} else {
415
413
let krate = queries. parse( ) ?;
416
414
pretty:: print(
@@ -443,9 +441,7 @@ fn run_compiler(
443
441
return early_exit( ) ;
444
442
}
445
443
446
- // Make sure the `write_dep_info` query is run for its side
447
- // effects of writing the dep-info and reporting errors.
448
- queries. global_ctxt( ) ?. enter( |tcx| tcx. write_dep_info( ( ) ) ) ;
444
+ queries. write_dep_info( ) ?;
449
445
450
446
if sess. opts. output_types. contains_key( & OutputType :: DepInfo )
451
447
&& 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 @@ -177,6 +177,13 @@ impl<'tcx> Queries<'tcx> {
177
177
} )
178
178
}
179
179
180
+ pub fn write_dep_info ( & ' tcx self ) -> Result < ( ) > {
181
+ self . global_ctxt ( ) ?. enter ( |tcx| {
182
+ passes:: write_dep_info ( tcx) ;
183
+ } ) ;
184
+ Ok ( ( ) )
185
+ }
186
+
180
187
pub fn ongoing_codegen ( & ' tcx self ) -> Result < Box < dyn Any > > {
181
188
self . global_ctxt ( ) ?. enter ( |tcx| {
182
189
// 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