File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
compiler/rustc_interface/src Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -360,16 +360,18 @@ impl Compiler {
360360 }
361361
362362 self . sess . time ( "serialize_dep_graph" , || gcx. enter ( rustc_incremental:: save_dep_graph) ) ;
363- queries. dep_graph_serialized_tx . send ( ( ) ) . ok ( ) ;
364363 }
365364
366- // The timer's lifetime spans the dropping of `queries`, which contains
367- // the global context.
368- _timer = Some ( self . sess . timer ( "free_global_ctxt" ) ) ;
365+ // Finish the dep graph encoding before we signal `dep_graph_serialized`.
369366 if let Err ( ( path, error) ) = queries. finish ( ) {
370367 self . sess . dcx ( ) . emit_fatal ( errors:: FailedWritingFile { path : & path, error } ) ;
371368 }
372369
370+ queries. dep_graph_serialized_tx . send ( ( ) ) . ok ( ) ;
371+
372+ // The timer's lifetime spans the dropping of `queries`, which contains
373+ // the global context.
374+ _timer = Some ( self . sess . timer ( "free_global_ctxt" ) ) ;
373375 ret
374376 }
375377}
You can’t perform that action at this time.
0 commit comments