diff options
| author | Daria Sukhonina <dariasukhonina@gmail.com> | 2025-08-26 19:18:39 +0300 |
|---|---|---|
| committer | Daria Sukhonina <dariasukhonina@gmail.com> | 2025-08-26 19:18:39 +0300 |
| commit | dd07459096beddf523b86a7ef03e4703390a7319 (patch) | |
| tree | d321b7ec82fcadf743e67daa9b8c9176aeec9627 /compiler/rustc_codegen_ssa/src | |
| parent | 82cc0eeec1a000b8f2b87a070ea807bdd41f44bf (diff) | |
| download | rust-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.rs | 3 |
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, |
