File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
compiler/rustc_driver/src Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -407,11 +407,10 @@ fn run_compiler(
407
407
return early_exit ( ) ;
408
408
}
409
409
410
- if sess. opts . debugging_opts . save_analysis {
411
- let crate_name = queries. crate_name ( ) ?. peek ( ) . clone ( ) ;
412
- queries. global_ctxt ( ) ?. peek_mut ( ) . enter ( |tcx| {
413
- let result = tcx. analysis ( LOCAL_CRATE ) ;
414
-
410
+ let crate_name = queries. crate_name ( ) ?. peek ( ) . clone ( ) ;
411
+ queries. global_ctxt ( ) ?. peek_mut ( ) . enter ( |tcx| {
412
+ let result = tcx. analysis ( LOCAL_CRATE ) ;
413
+ if sess. opts . debugging_opts . save_analysis {
415
414
sess. time ( "save_analysis" , || {
416
415
save:: process_crate (
417
416
tcx,
@@ -424,12 +423,9 @@ fn run_compiler(
424
423
) ,
425
424
)
426
425
} ) ;
427
-
428
- result
429
- } ) ?;
430
- }
431
-
432
- queries. global_ctxt ( ) ?. peek_mut ( ) . enter ( |tcx| tcx. analysis ( LOCAL_CRATE ) ) ?;
426
+ }
427
+ result
428
+ } ) ?;
433
429
434
430
if callbacks. after_analysis ( compiler, queries) == Compilation :: Stop {
435
431
return early_exit ( ) ;
You can’t perform that action at this time.
0 commit comments