Repository navigation
WIP: fix(tests): drop unneeded mut in issue1184 run_rubash_file - #2002
Merged
Merged
Conversation
cargo check --all-targets under RUSTFLAGS=-D warnings flagged tests/issue1184_f4_procsub_diag_line_regressions.rs:38: the child in run_rubash_file is only consumed by wait_with_output() and never needs a mutable binding (the run_stdin sibling at line 56 keeps its mut: it writes through child.stdin.as_mut()). Stock wart on master, unrelated to any in-flight work.
caomengxuan666
marked this pull request as ready for review
October 28, 2026 23:34
SpookyWaste
pushed a commit
to SpookyWaste/rubash
that referenced
this pull request
Oct 29, 2026
Master's cargo check --all-targets under RUSTFLAGS=-D warnings carried 24 pre-existing errors across 18 test files (census: fix-1184-wart REPORT; the 25th, tests/issue1184, was fixed by unixwin#2002). CI never sees them: master CI does not run --all-targets -D warnings and niu CI only compiles the rubash lib with -D warnings. Dispositions, per compiler diagnosis, tests/ only, no src/ changes: - never-read harness fields removed (Output.status x5, Run.code, Run.stderr x2) together with their construction sites - unused imports removed (debugger_flag Path; issue705 Write + Stdio; issue804 Write, orphaned by the run_face removal) - unused variables bound as _ (issue1520 stdout, issue282 rc); unused parameter workload(i) -> _i in multi_session_isolation - unused mut removed (issue1845 stdin-file arm; multi_session b, which is only dropped) - dead helpers removed: issue531 e_lines (zero callers), issue804 run_face (zero callers; tests drive run_command/run_r) - issue555 quoted_cases gated #[cfg(windows)] to match its sole caller - six #[test] names that mirror literal flag/spec spellings (declare -nA x2, declare -aA / -a -A, Oils arith/invalid-const-A / -B-fresh) keep their names under per-item #[allow(non_snake_case)] with the reason on the line; snake_case would collide with the distinct -na / -a shapes they must stay distinguishable from No blanket allows, no behavior changes: every removed field/helper was provably unread/uncalled (that is the lint itself), and no assertion was touched.
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.
One-line stock-wart fix on master (d48197c).
The wart (verbatim from
cargo check --all-targetswithRUSTFLAGS="-D warnings")Fix
Remove the
mutat line 38 only. The siblinglet mut childat line 56 (run_stdin) is not flagged and stays: it writes throughchild.stdin.as_mut(). Diff is exactly 1 line; per-file rustfmt applied; CR count 0.Verification
cargo check --test issue1184_f4_procsub_diag_line_regressionsunder-D warnings: clean (rc=0).cargo check --all-targets --keep-goingerror census: 25 → 24, with zero remaining errors in the issue1184 file.builtins::test::tests::ownership_unary_operators_check_existing_file(known tree baseline).Out of scope, flagged for disposition
--all-targets -D warningsis not fully green on master: 24 pre-existing errors remain across 18 other test files (never-readstatus/code/stderrfields, unused variables/imports, non-snake-case fn names, dead fns — in issue530/544/1520/1548/1687/1845/1847/282/528/531/555/621/651/705/804, multi_session_isolation, oils_spec_arith, debugger_flag_gnu_parity). They predate and are unrelated to this wart; full census is in the cluster REPORT (~/workspace/fix-1184-wart/REPORT.md). This PR deliberately does not touch them.