Skip to content

Commit dd07459

Browse files
committed
Comment on intentional field order
1 parent 82cc0ee commit dd07459

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+3
-0
lines changed

compiler/rustc_codegen_ssa/src/back/write.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,6 +1958,9 @@ pub struct OngoingCodegen<B: ExtraBackendMethods> {
19581958
pub backend: B,
19591959
pub crate_info: CrateInfo,
19601960
pub output_filenames: Arc<OutputFilenames>,
1961+
// Field order below is intended to terminate the coordinator thread before two fields below
1962+
// drop and prematurely close channels used by coordinator thread. See `Coordinator`'s
1963+
// `Drop` implementation for more info.
19611964
pub coordinator: Coordinator<B>,
19621965
pub codegen_worker_receive: Receiver<CguMessage>,
19631966
pub shared_emitter_main: SharedEmitterMain,

0 commit comments

Comments
 (0)