File tree 1 file changed +5
-5
lines changed
compiler/rustc_driver_impl/src
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -326,14 +326,16 @@ fn run_compiler(
326
326
}
327
327
}
328
328
329
- let mut gctxt = queries. global_ctxt ( ) ?;
329
+ // Make sure name resolution and macro expansion is run.
330
+ queries. global_ctxt ( ) ?;
331
+
330
332
if callbacks. after_expansion ( compiler, queries) == Compilation :: Stop {
331
333
return early_exit ( ) ;
332
334
}
333
335
334
336
// Make sure the `output_filenames` query is run for its side
335
337
// effects of writing the dep-info and reporting errors.
336
- gctxt . enter ( |tcx| tcx. output_filenames ( ( ) ) ) ;
338
+ queries . global_ctxt ( ) ? . enter ( |tcx| tcx. output_filenames ( ( ) ) ) ;
337
339
338
340
if sess. opts . output_types . contains_key ( & OutputType :: DepInfo )
339
341
&& sess. opts . output_types . len ( ) == 1
@@ -345,7 +347,7 @@ fn run_compiler(
345
347
return early_exit ( ) ;
346
348
}
347
349
348
- gctxt . enter ( |tcx| {
350
+ queries . global_ctxt ( ) ? . enter ( |tcx| {
349
351
let result = tcx. analysis ( ( ) ) ;
350
352
if sess. opts . unstable_opts . save_analysis {
351
353
let crate_name = tcx. crate_name ( LOCAL_CRATE ) ;
@@ -362,8 +364,6 @@ fn run_compiler(
362
364
result
363
365
} ) ?;
364
366
365
- drop ( gctxt) ;
366
-
367
367
if callbacks. after_analysis ( compiler, queries) == Compilation :: Stop {
368
368
return early_exit ( ) ;
369
369
}
You can’t perform that action at this time.
0 commit comments