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 @@ -417,9 +417,7 @@ fn run_compiler(
417
417
Ok ( ( ) )
418
418
} ) ?;
419
419
420
- // Make sure the `write_dep_info` query is run for its side
421
- // effects of writing the dep-info and reporting errors.
422
- queries. global_ctxt( ) ?. enter( |tcx| tcx. write_dep_info( ( ) ) ) ;
420
+ queries. write_dep_info( ) ?;
423
421
} else {
424
422
let krate = queries. parse( ) ?. steal( ) ;
425
423
pretty:: print( sess, * ppm, pretty:: PrintExtra :: AfterParsing { krate } ) ;
@@ -450,9 +448,7 @@ fn run_compiler(
450
448
return early_exit( ) ;
451
449
}
452
450
453
- // Make sure the `write_dep_info` query is run for its side
454
- // effects of writing the dep-info and reporting errors.
455
- queries. global_ctxt( ) ?. enter( |tcx| tcx. write_dep_info( ( ) ) ) ;
451
+ queries. write_dep_info( ) ?;
456
452
457
453
if sess. opts. output_types. contains_key( & OutputType :: DepInfo )
458
454
&& sess. opts. output_types. len( ) == 1
Original file line number Diff line number Diff line change @@ -564,7 +564,7 @@ fn resolver_for_lowering<'tcx>(
564
564
tcx. arena . alloc ( Steal :: new ( ( untracked_resolver_for_lowering, Lrc :: new ( krate) ) ) )
565
565
}
566
566
567
- fn write_dep_info ( tcx : TyCtxt < ' _ > , ( ) : ( ) ) {
567
+ pub ( crate ) fn write_dep_info ( tcx : TyCtxt < ' _ > ) {
568
568
// Make sure name resolution and macro expansion is run for
569
569
// the side-effect of providing a complete set of all
570
570
// accessed files and env vars.
@@ -617,7 +617,6 @@ pub static DEFAULT_QUERY_PROVIDERS: LazyLock<Providers> = LazyLock::new(|| {
617
617
let providers = & mut Providers :: default ( ) ;
618
618
providers. analysis = analysis;
619
619
providers. hir_crate = rustc_ast_lowering:: lower_to_hir;
620
- providers. write_dep_info = write_dep_info;
621
620
providers. resolver_for_lowering = resolver_for_lowering;
622
621
providers. early_lint_checks = early_lint_checks;
623
622
proc_macro_decls:: provide ( providers) ;
Original file line number Diff line number Diff line change @@ -179,6 +179,13 @@ impl<'tcx> Queries<'tcx> {
179
179
} )
180
180
}
181
181
182
+ pub fn write_dep_info ( & ' tcx self ) -> Result < ( ) > {
183
+ self . global_ctxt ( ) ?. enter ( |tcx| {
184
+ passes:: write_dep_info ( tcx) ;
185
+ } ) ;
186
+ Ok ( ( ) )
187
+ }
188
+
182
189
pub fn ongoing_codegen ( & ' tcx self ) -> Result < Box < dyn Any > > {
183
190
self . global_ctxt ( ) ?. enter ( |tcx| {
184
191
// 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