Repository navigation
fix(build): add missing closed field to two FileFd literals (Refs #3213) - #3666
Merged
Merged
Conversation
…3213) #3473 added `closed: Cell<bool>` to `fd_table::FileFd` (fd_table.rs:77-91) and updated every other struct literal in the tree, but missed the two `FileFd { handle, path: ... }` literals in `src/executor/external_setup.rs:2727` and `:2769`. `cargo build` on master therefore failed with two `error[E0063]: missing field 'closed'` errors and the tip has been uncompilable since #3473 merged (2026-11-15 13:06 CST). This adds `closed: std::cell::Cell::new(false),` at both sites, in the exact form used by the other eight literals in the same file. No behaviour change: the field is `false` at construction, matching every other construction site. Refs #3213
Member
Author
|
队长复核 PASS(2026-11-15 14:2x,gh 核 + REPORT 全读)。 修法:external_setup.rs:2727、:2769 两处 FileFd 字面量各补 腿(车道实测,队长核过 REPORT 与 PR diff):
覆盖缺口裁定(不拦合入):两处在 apply_procsub_spawn_plan_fd(procsub spawn-plan fd 恢复臂),#3213 stem 不走这两臂,故无逐点执行证据。裁定:本单为两行机械补字段(初值 false 与全部构造点一致、无行为变化),编译通过 + 同形 + #3213 行为面 7/7 已足;两臂的执行覆盖是 procsub 面的既有测试覆盖问题,不由本编译修复单补钉。 合入轮:基底 0dab80c 落后尖 e527da1 四合(#3166/#3600/#3475/#3589,皆不碰 external_setup.rs/fd_table.rs,零交集已核);合入前 update-branch + 合并形重验(check + #3213 stem + RUSTFLAGS="-D warnings" check)。#3213 仍 OPEN(Refs-only)。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
根因
#3473 给
fd_table::FileFd加了closed: Cell<bool>字段(src/executor/fd_table.rs:77-91,#3213 面),全树其它字面量都补了,唯独漏了src/executor/external_setup.rs的两处FileFd { handle, path: ... }:src/executor/external_setup.rs:2727(let handle = crate::fd::into_handle(seeked);臂)src/executor/external_setup.rs:2769(duplicate_handle_inheritable臂)cargo build因此报两处error[E0063]: missing field 'closed',尖自 #3473 合入(2026-11-15 13:06 CST)起不可编译。本 PR
两处各加一行
closed: std::cell::Cell::new(false),,与同一文件另 8 处字面量的写法逐字同形。仅此两行,不动其它;无行为变化(字段构造时即为false,与其他所有构造点一致)。本 PR 删除了什么
什么也没删除。仅新增两行字段初始化;无文件、无代码、无测试删除。
验证
cargo check --locked --lib --bins在尖 0dab80c 上两处 E0063,rc=101(fail-first)。cargo check --locked --lib --bins干净,rc=0;cargo build --locked -j1 --bin rubash成功(2m25s)。tests/issue3213_varredir_proc_fd_visibility.rs:7/7 全绿。--version正常;exec {v}>f.txt后v=10,/proc/7829/fd含该号且 readlink 指向 f.txt。UNVERIFIED-BY-CAPTAIN
Refs #3213