about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorDaria Sukhonina <dariasukhonina@gmail.com>2025-08-26 19:18:39 +0300
committerDaria Sukhonina <dariasukhonina@gmail.com>2025-08-26 19:18:39 +0300
commitdd07459096beddf523b86a7ef03e4703390a7319 (patch)
treed321b7ec82fcadf743e67daa9b8c9176aeec9627 /compiler/rustc_codegen_ssa/src
parent82cc0eeec1a000b8f2b87a070ea807bdd41f44bf (diff)
downloadrust-dd07459096beddf523b86a7ef03e4703390a7319.tar.gz
rust-dd07459096beddf523b86a7ef03e4703390a7319.zip
Comment on intentional field order
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/write.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs
index 0d766d2704b..8586615f7c7 100644
--- a/compiler/rustc_codegen_ssa/src/back/write.rs
+++ b/compiler/rustc_codegen_ssa/src/back/write.rs
@@ -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,