Clippy clean again, with and without --all-features (both CI clippy steps fail on main) #409

Open
github-bot wants to merge 1 commit from github-bot/gh-409 into main AGit
Owner

@⁠NerYtheLonesomeHearthian on GitHub · 2026-11-27 00:43 UTC · original
NerYtheLonesomeHearthian:fix/clippy-main → main · +4 −3 · 3 files · 1 commits · open

Both clippy steps in ci.yml currently fail on main (126acb3): 8 errors without features and 6 with --all-features. This fixes all of them at the source without #[allow] or #[expect]:

  • crates/victory-gpu/src/list.rs: Gate pub(crate) fn totals() with #[cfg(all(windows, feature = "diagnostics"))] to match its sole caller (crate::popwatch), fixing dead_code in builds without diagnostics.
  • crates/victory-gpu/src/watch.rs: Pass &title_memory_changed(at, len) instead of &mut ... to open(&Guards, ...) in title_memory_remapped (clippy::unnecessary_mut_passed). The temporary RwLockWriteGuard still lives to the end of the statement, so lock exclusivity and lifetime are unchanged.
  • crates/victory-loader/src/descriptor_sites.rs (tests): Add explicit transmute::<usize, F> annotations at lines 494 and 559 (clippy::missing_transmute_annotations).

Note on overlap: this completes #362 against current main (same watch.rs hunk, updated descriptor_sites.rs covering both lines 494 and 559, plus list.rs:1870).

Verification

  • cargo xtask policy — pass (265 files ok)
  • cargo clippy --workspace --all-targets --locked -- -D warnings — pass (exit 0)
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings — pass (exit 0)
  • cargo test -p victory-loader --lib -- descriptor_sites — pass (4 passed; 0 failed)
  • $env:VICTORY_DXIL = "..."; cargo test --workspace -- --test-threads=1 — victory-gpu (384 passed; 0 failed), victory-loader (52 passed; 0 failed), and all preceding crates pass; stops in untouched victory-shader at the known RDNA 4 amdxc64.dll crash in emit::size_tests::the_record_count_of_a_structured_buffer_read_by_index (#8).

Implemented with Claude Code (Opus 5.5), independently audited with Gemini 4 Carbon, tested in Win11 Hyper-V VM (ez-GPU-PV) on RX 9070 XT / 5800X3D. Because graphics runs are not meaningful on a Hyper-V paravirtualized GPU, verification here covers static analysis (clippy) and unit tests only.

**@⁠NerYtheLonesomeHearthian** on GitHub · 2026-11-27 00:43 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/409) `NerYtheLonesomeHearthian:fix/clippy-main` → `main` · +4 −3 · 3 files · 1 commits · open Both clippy steps in `ci.yml` currently fail on `main` (`126acb3`): 8 errors without features and 6 with `--all-features`. This fixes all of them at the source without `#[allow]` or `#[expect]`: - `crates/victory-gpu/src/list.rs`: Gate `pub(crate) fn totals()` with `#[cfg(all(windows, feature = "diagnostics"))]` to match its sole caller (`crate::popwatch`), fixing `dead_code` in builds without `diagnostics`. - `crates/victory-gpu/src/watch.rs`: Pass `&title_memory_changed(at, len)` instead of `&mut ...` to `open(&Guards, ...)` in `title_memory_remapped` (`clippy::unnecessary_mut_passed`). The temporary `RwLockWriteGuard` still lives to the end of the statement, so lock exclusivity and lifetime are unchanged. - `crates/victory-loader/src/descriptor_sites.rs` (tests): Add explicit `transmute::<usize, F>` annotations at lines 494 and 559 (`clippy::missing_transmute_annotations`). Note on overlap: this completes #362 against current `main` (same `watch.rs` hunk, updated `descriptor_sites.rs` covering both lines 494 and 559, plus `list.rs:1870`). ### Verification - `cargo xtask policy` — pass (`265 files ok`) - `cargo clippy --workspace --all-targets --locked -- -D warnings` — pass (exit 0) - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` — pass (exit 0) - `cargo test -p victory-loader --lib -- descriptor_sites` — pass (`4 passed; 0 failed`) - `$env:VICTORY_DXIL = "..."; cargo test --workspace -- --test-threads=1` — `victory-gpu` (`384 passed; 0 failed`), `victory-loader` (`52 passed; 0 failed`), and all preceding crates pass; stops in untouched `victory-shader` at the known RDNA 4 `amdxc64.dll` crash in `emit::size_tests::the_record_count_of_a_structured_buffer_read_by_index` (#8). Implemented with Claude Code (Opus 5.5), independently audited with Gemini 4 Carbon, tested in Win11 Hyper-V VM (ez-GPU-PV) on RX 9070 XT / 5800X3D. Because graphics runs are not meaningful on a Hyper-V paravirtualized GPU, verification here covers static analysis (`clippy`) and unit tests only.
Without features cargo counted 8 errors (6 sites), with --all-features 6
(5 sites). totals() in list.rs is compiled where its one caller, popwatch,
is (windows and diagnostics): without diagnostics it was dead code.
title_memory_remapped hands open() the write guard as &, which is what open
takes (clippy::unnecessary_mut_passed); the lock is held as before. The two
transmutes of code addresses in the descriptor sites' tests name their types
(clippy::missing_transmute_annotations). No lint is allowed or expected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:56:49 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/409/head:github-bot/gh-409'
git switch 'github-bot/gh-409'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-409'
git switch 'github-bot/gh-409'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-409'
git switch 'github-bot/gh-409'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-409'
git switch 'main'
git merge --squash 'github-bot/gh-409'
git switch 'main'
git merge --ff-only 'github-bot/gh-409'
git switch 'main'
git merge 'github-bot/gh-409'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.