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

Open
NerYtheLonesomeHearthian wants to merge 1 commit from upstream-pr/409 into main
NerYtheLonesomeHearthian commented 2026-11-27 00:43:18 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by NerYtheLonesomeHearthian on 2026-11-27T00:43:18Z.


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.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:5519215646 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/409). Originally posted by [NerYtheLonesomeHearthian](https://github.com/NerYtheLonesomeHearthian) on 2026-11-27T00:43:18Z. --- 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.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/409:upstream-pr/409'
git switch 'upstream-pr/409'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/409'
git switch 'upstream-pr/409'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/409'
git switch 'upstream-pr/409'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/409'
git switch 'main'
git merge --squash 'upstream-pr/409'
git switch 'main'
git merge --ff-only 'upstream-pr/409'
git switch 'main'
git merge 'upstream-pr/409'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
avatarmanz/VIctory-7900XTX!409
No description provided.