Comment on intentional field order

This commit is contained in:
Daria Sukhonina 2025-08-26 19:18:39 +03:00
parent 82cc0eeec1
commit dd07459096

View file

@ -1958,6 +1958,9 @@ pub struct OngoingCodegen<B: ExtraBackendMethods> {
pub backend: B,
pub crate_info: CrateInfo,
pub output_filenames: Arc<OutputFilenames>,
// Field order below is intended to terminate the coordinator thread before two fields below
// drop and prematurely close channels used by coordinator thread. See `Coordinator`'s
// `Drop` implementation for more info.
pub coordinator: Coordinator<B>,
pub codegen_worker_receive: Receiver<CguMessage>,
pub shared_emitter_main: SharedEmitterMain,