clippy -D warnings fails on v2026.11.30.03: loop_caps, ranged, manual is_multiple_of #4618

Closed
opened 2026-12-01 00:04:39 +00:00 by github-bot · 2 comments
Owner

@⁠gbmrrr on GitHub · 2026-11-30 23:53 UTC · original

Summary

cargo clippy --workspace --all-targets --locked -- -D warnings — the exact command ci.yml runs — fails on v2026.11.30.03 with three errors, none of them in fork code. Reproduced from a detached worktree of the tag with its own CARGO_TARGET_DIR, so nothing of ours was in the build:

$ git worktree add --detach /tmp/upstream-clippy v2026.11.30.03
$ cd /tmp/upstream-clippy
$ cargo clippy -p victory-shader -p victory-gpu --all-targets --locked -- -D warnings

error: field `loop_caps` is never read
   --> crates\victory-shader\src\emit\lower.rs:114:9
    |
 72 | pub(crate) struct Lowered {
    |                   ------- field in this struct
...
114 |     pub loop_caps: Vec<u32>,
    |         ^^^^^^^^^
    = note: `-D dead-code` implied by `-D warnings`

error: method `ranged` is never used
    --> crates\victory-gpu\src\shadow.rs:7212:8
     |
5837 | impl Shadow {
     | ----------- method in this implementation
...
7212 |     fn ranged(&self, from: usize, to: usize) -> u64 {
     |        ^^^^^^
     = note: `-D dead-code` implied by `-D warnings`

error: manual implementation of `.is_multiple_of()`
    --> crates\victory-gpu\src\host.rs:5092:16
     |
5092 |             if seed % 3 == 0 && !held.is_empty() {
     |                ^^^^^^^^^^^^^ help: replace with: `seed.is_multiple_of(3)`
     = note: `-D clippy::manual-is-multiple-of` implied by `-D warnings`

Toolchain

Exactly the pinned one — nothing to do with a newer compiler:

$ cargo --version        cargo 1.98.1 (797e8a9bc 2026-08-05)
$ clippy --version       clippy 0.1.98 (48a229ceae 2026-09-01)
$ rustc --version        rustc 1.98.1 (48a229cea 2026-09-01)

rust-toolchain.toml at the tag pins channel = "1.98.1" with clippy in its components.

Machine

GPU: NVIDIA GeForce RTX 5070 Ti, driver 621.40
Windows: 11 Home Single Language, build 26300, 26H2

The two dead-code errors and the is_multiple_of lint are host-independent; WARP vs hardware does not enter into it.

Where each came from

Error Introduced by
loop_caps 1d536280 "Shaders: a loop whose trip count the program fixes runs it in full, past the stage's loop cap"
ranged 8ab3c034 "Copies remember the ranges they took whole in a memo of their own…" (and 27d312d3, b8bf6d51 before it)
seed % 3 7addcfc7 "Relay: the compare captures what changed in the flight's own submission…"

loop_caps is written and moved but never read: lower.rs:1865 initialises it, :2731 moves it into the emitted struct, :14793 pushes to it, and nothing consumes the field afterwards. ranged was superseded by ranged_lockfree / ranged_lockfree_parts (both called at :7098, :7143, :7168); only the locked pair is now unreachable. The third is a one-character lint in a test.

How it shipped

ci.yml on this tag triggers on pull_request and push: branches: [main] — no tags: filter:

on:
  pull_request:
  push:
    branches: [main]

So pushing the release tag runs only spam, needs-logs, title-labels and game-requests. And the CI runs on main and on the open PR branches are all sitting at action_required rather than completing, which is consistent with the gate never having gone green on a recent merge either:

$ gh run list --workflow ci.yml
action_required  fix/play-mfg-under-victory-home-v2   2026-11-30T23:51
action_required  fix/bench-pipeline-failed-v2          2026-11-30T23:51
action_required  perf/land-default-threads-up-to-8     2026-11-30T23:51
                 main  README: the F1 guide names…      2026-11-30T23:47

No crash log to attach: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log does not exist and there is no *.crash.log under temp\. This is a compiler gate, not a run.

Suggested fix

// lower.rs — either drop the field from Lowered, or if the cap really does need to travel:
pub loop_caps: Vec<u32>,          // + a reader, or #[expect(dead_code)] with the reason

// shadow.rs — delete `ranged` and `ranged_parts` if `ranged_lockfree*` is now the only path,
//             or keep and mark with the reason the locked version survives

// host.rs:5092 — the lint's own suggestion
if seed.is_multiple_of(3) && !held.is_empty() {

Happy to send these as one patch if you want them, or leave them to you — flagging rather than driving since two of the three are judgement calls about whether the code is genuinely dead or just not yet wired.

Filed alongside this one: #4563, a deterministic victory-shader test failure that also shipped in this tag for the same reason — the tag never ran the suite.

**@⁠gbmrrr** on GitHub · 2026-11-30 23:53 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/4617) ## Summary `cargo clippy --workspace --all-targets --locked -- -D warnings` — the exact command `ci.yml` runs — fails on `v2026.11.30.03` with three errors, none of them in fork code. Reproduced from a detached worktree of the tag with its own `CARGO_TARGET_DIR`, so nothing of ours was in the build: ``` $ git worktree add --detach /tmp/upstream-clippy v2026.11.30.03 $ cd /tmp/upstream-clippy $ cargo clippy -p victory-shader -p victory-gpu --all-targets --locked -- -D warnings error: field `loop_caps` is never read --> crates\victory-shader\src\emit\lower.rs:114:9 | 72 | pub(crate) struct Lowered { | ------- field in this struct ... 114 | pub loop_caps: Vec<u32>, | ^^^^^^^^^ = note: `-D dead-code` implied by `-D warnings` error: method `ranged` is never used --> crates\victory-gpu\src\shadow.rs:7212:8 | 5837 | impl Shadow { | ----------- method in this implementation ... 7212 | fn ranged(&self, from: usize, to: usize) -> u64 { | ^^^^^^ = note: `-D dead-code` implied by `-D warnings` error: manual implementation of `.is_multiple_of()` --> crates\victory-gpu\src\host.rs:5092:16 | 5092 | if seed % 3 == 0 && !held.is_empty() { | ^^^^^^^^^^^^^ help: replace with: `seed.is_multiple_of(3)` = note: `-D clippy::manual-is-multiple-of` implied by `-D warnings` ``` ## Toolchain Exactly the pinned one — nothing to do with a newer compiler: ``` $ cargo --version cargo 1.98.1 (797e8a9bc 2026-08-05) $ clippy --version clippy 0.1.98 (48a229ceae 2026-09-01) $ rustc --version rustc 1.98.1 (48a229cea 2026-09-01) ``` `rust-toolchain.toml` at the tag pins `channel = "1.98.1"` with `clippy` in its components. ## Machine **GPU:** NVIDIA GeForce RTX 5070 Ti, driver 621.40 **Windows:** 11 Home Single Language, build 26300, 26H2 The two `dead-code` errors and the `is_multiple_of` lint are host-independent; WARP vs hardware does not enter into it. ## Where each came from | Error | Introduced by | |---|---| | `loop_caps` | `1d536280` "Shaders: a loop whose trip count the program fixes runs it in full, past the stage's loop cap" | | `ranged` | `8ab3c034` "Copies remember the ranges they took whole in a memo of their own…" (and `27d312d3`, `b8bf6d51` before it) | | `seed % 3` | `7addcfc7` "Relay: the compare captures what changed in the flight's own submission…" | `loop_caps` is written and moved but never read: `lower.rs:1865` initialises it, `:2731` moves it into the emitted struct, `:14793` pushes to it, and nothing consumes the field afterwards. `ranged` was superseded by `ranged_lockfree` / `ranged_lockfree_parts` (both called at `:7098`, `:7143`, `:7168`); only the locked pair is now unreachable. The third is a one-character lint in a test. ## How it shipped `ci.yml` on this tag triggers on `pull_request` and `push: branches: [main]` — **no `tags:` filter**: ```yaml on: pull_request: push: branches: [main] ``` So pushing the release tag runs only `spam`, `needs-logs`, `title-labels` and `game-requests`. And the `CI` runs on `main` and on the open PR branches are all sitting at `action_required` rather than completing, which is consistent with the gate never having gone green on a recent merge either: ``` $ gh run list --workflow ci.yml action_required fix/play-mfg-under-victory-home-v2 2026-11-30T23:51 action_required fix/bench-pipeline-failed-v2 2026-11-30T23:51 action_required perf/land-default-threads-up-to-8 2026-11-30T23:51 main README: the F1 guide names… 2026-11-30T23:47 ``` No crash log to attach: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log` does not exist and there is no `*.crash.log` under `temp\`. This is a compiler gate, not a run. ## Suggested fix ```rust // lower.rs — either drop the field from Lowered, or if the cap really does need to travel: pub loop_caps: Vec<u32>, // + a reader, or #[expect(dead_code)] with the reason // shadow.rs — delete `ranged` and `ranged_parts` if `ranged_lockfree*` is now the only path, // or keep and mark with the reason the locked version survives // host.rs:5092 — the lint's own suggestion if seed.is_multiple_of(3) && !held.is_empty() { ``` Happy to send these as one patch if you want them, or leave them to you — flagging rather than driving since two of the three are judgement calls about whether the code is genuinely dead or just not yet wired. ## Related Filed alongside this one: #4563, a deterministic `victory-shader` test failure that also shipped in this tag for the same reason — the tag never ran the suite.
github-bot 2026-12-01 00:04:39 +00:00
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 00:04:39 +00:00
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-30 23:54 UTC · original

Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU you have and which Windows version (10 or 11).

If this issue needs logs and none are posted here within 12 hours, it will be closed. Add them by editing your post or in a comment.

**@⁠github-actions[bot]** on GitHub · 2026-11-30 23:54 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/4617#issuecomment-7295658784) Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU you have and which Windows version (10 or 11). **If this issue needs logs and none are posted here within 12 hours, it will be closed.** Add them by editing your post or in a comment.
Author
Owner

@⁠gbmrrr on GitHub · 2026-12-01 00:01 UTC · original

Resolved upstream already — closing it myself rather than waiting out the needs-logs timer, since this one needs no play log or crash log at all: it is a compiler gate, reproducible with three commands and no title.

Fixed by 343bf99f ("Clippy passes on main again, and two tests of victory-gpu that the merges left behind", banaanpapa). All three errors I reported are in it:

  • victory-shader's Lowered::loop_caps — allowed with a note, since the tests now read it.
  • victory-gpu's Shadow::ranged — removed; the sentence moved to ranged_parts, which is what the callers ask for.
  • The seed % 3 == 0 in a test — now is_multiple_of.

That commit also caught two I missed: copystat.rs's free mb being shadowed by a closure of the same name, and an unwrap_or_default-shaped match in victory-hle. Good.

The reproduction in my report still holds and may be worth keeping in mind: from a detached worktree of the tag with its own CARGO_TARGET_DIR,

$ cargo clippy -p victory-shader -p victory-gpu --all-targets --locked -- -D warnings
error: field `loop_caps` is never read
error: method `ranged` is never used
error: manual implementation of `.is_multiple_of()`

and ci.yml's push: has no tags: filter, so the tag v2026.11.30.03 went out without that gate ever running on it.

One thing I should flag for the record, not as a complaint: I had loop_caps and ranged down as "judgement calls about whether the code is genuinely dead", and offered to leave them to you. 343bf99f settled both correctly. My hesitation was unnecessary — a -D warnings failure on main blocks every PR, so it is worth fixing decisively rather than asking.

**@⁠gbmrrr** on GitHub · 2026-12-01 00:01 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/4617#issuecomment-7295823930) Resolved upstream already — closing it myself rather than waiting out the `needs-logs` timer, since this one needs no play log or crash log at all: it is a compiler gate, reproducible with three commands and no title. Fixed by `343bf99f` ("Clippy passes on main again, and two tests of victory-gpu that the merges left behind", banaanpapa). All three errors I reported are in it: - `victory-shader`'s `Lowered::loop_caps` — allowed with a note, since the tests now read it. - `victory-gpu`'s `Shadow::ranged` — removed; the sentence moved to `ranged_parts`, which is what the callers ask for. - The `seed % 3 == 0` in a test — now `is_multiple_of`. That commit also caught two I missed: `copystat.rs`'s free `mb` being shadowed by a closure of the same name, and an `unwrap_or_default`-shaped `match` in `victory-hle`. Good. The reproduction in my report still holds and may be worth keeping in mind: from a detached worktree of the tag with its own `CARGO_TARGET_DIR`, ``` $ cargo clippy -p victory-shader -p victory-gpu --all-targets --locked -- -D warnings error: field `loop_caps` is never read error: method `ranged` is never used error: manual implementation of `.is_multiple_of()` ``` and `ci.yml`'s `push:` has no `tags:` filter, so the tag `v2026.11.30.03` went out without that gate ever running on it. One thing I should flag for the record, not as a complaint: I had `loop_caps` and `ranged` down as "judgement calls about whether the code is genuinely dead", and offered to leave them to you. `343bf99f` settled both correctly. My hesitation was unnecessary — a `-D warnings` failure on `main` blocks every PR, so it is worth fixing decisively rather than asking.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA#4618
No description provided.