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 @@ -411,11 +411,10 @@ fn run_compiler(
411
411
return early_exit ( ) ;
412
412
}
413
413
414
- if sess. opts . debugging_opts . save_analysis {
415
- let crate_name = queries. crate_name ( ) ?. peek ( ) . clone ( ) ;
416
- queries. global_ctxt ( ) ?. peek_mut ( ) . enter ( |tcx| {
417
- let result = tcx. analysis ( LOCAL_CRATE ) ;
418
-
414
+ let crate_name = queries. crate_name ( ) ?. peek ( ) . clone ( ) ;
415
+ queries. global_ctxt ( ) ?. peek_mut ( ) . enter ( |tcx| {
416
+ let result = tcx. analysis ( LOCAL_CRATE ) ;
417
+ if sess. opts . debugging_opts . save_analysis {
419
418
sess. time ( "save_analysis" , || {
420
419
save:: process_crate (
421
420
tcx,
@@ -428,12 +427,9 @@ fn run_compiler(
428
427
) ,
429
428
)
430
429
} ) ;
431
-
432
- result
433
- } ) ?;
434
- }
435
-
436
- queries. global_ctxt ( ) ?. peek_mut ( ) . enter ( |tcx| tcx. analysis ( LOCAL_CRATE ) ) ?;
430
+ }
431
+ result
432
+ } ) ?;
437
433
438
434
if callbacks. after_analysis ( compiler, queries) == Compilation :: Stop {
439
435
return early_exit ( ) ;
You can’t perform that action at this time.
0 commit comments