Diagnostics-only barrier stats: six needless borrows the all-features gate refuses #3086

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

@⁠TheSovietWaffle on GitHub · 2026-11-29 19:56 UTC · original
TheSovietWaffle:fix/diagnostics-gate → main · +6 −6 · 2 files · 1 commits · open

The build half of this is in main now (41adb55, "Diagnostics build compiles again"): the mb helper in log_heap_elsewhere and self::timing() at the three submission sites. What is left is the second gate: with the diagnostics feature on, clippy -D warnings refuses six barstat::rb calls that pass a reference to an already-borrowed list.

What it changes

Six diagnostics-only barrier-stat calls pass the list they already have:

  • crates/victory-gpu/src/host.rs: two crate::barstat::rb(&list, …) in the read-back capture.
  • crates/victory-gpu/src/compose.rs: four rb(&l, …) / rb(&cmds, …) in the display-plane tests.

barstat::rb takes &ID3D12GraphicsCommandList, so the extra & is a reference to a reference; clippy::needless_borrows refuses it under -D warnings. They sit behind feature = "diagnostics", so no earlier lint run could see them: the plain Clippy step never compiles them, and the --all-features step never ran while the build was broken.

How it was tested

  • cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings: the six errors before, none after. The one remaining needless_borrows in that run is crates/victory-gpu/src/list.rs:2692 (handles), which is not a barstat call and not touched here.
  • cargo check -p victory-gpu --tests --profile diag --features diagnostics: Finished (with 41adb55 in the base).
  • No title, GPU profile or game data is involved; the change is six & removals in diagnostics-only code.

Checked for overlap

  • I searched the open pull requests for these files and for barstat. Related: #2792 and #3385 repair the first Clippy gate on main (unused imports and the like, #2019); #2772 covers other victory-gpu findings, including list.rs:2692; none removes these six borrows.
**@⁠TheSovietWaffle** on GitHub · 2026-11-29 19:56 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3086) `TheSovietWaffle:fix/diagnostics-gate` → `main` · +6 −6 · 2 files · 1 commits · open The build half of this is in `main` now (41adb55, "Diagnostics build compiles again"): the `mb` helper in `log_heap_elsewhere` and `self::timing()` at the three submission sites. What is left is the second gate: with the diagnostics feature on, `clippy -D warnings` refuses six `barstat::rb` calls that pass a reference to an already-borrowed list. ## What it changes Six diagnostics-only barrier-stat calls pass the list they already have: - `crates/victory-gpu/src/host.rs`: two `crate::barstat::rb(&list, …)` in the read-back capture. - `crates/victory-gpu/src/compose.rs`: four `rb(&l, …)` / `rb(&cmds, …)` in the display-plane tests. `barstat::rb` takes `&ID3D12GraphicsCommandList`, so the extra `&` is a reference to a reference; `clippy::needless_borrows` refuses it under `-D warnings`. They sit behind `feature = "diagnostics"`, so no earlier lint run could see them: the plain Clippy step never compiles them, and the `--all-features` step never ran while the build was broken. ## How it was tested - `cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings`: the six errors before, none after. The one remaining `needless_borrows` in that run is `crates/victory-gpu/src/list.rs:2692` (`handles`), which is not a `barstat` call and not touched here. - `cargo check -p victory-gpu --tests --profile diag --features diagnostics`: `Finished` (with 41adb55 in the base). - No title, GPU profile or game data is involved; the change is six `&` removals in diagnostics-only code. ## Checked for overlap - [x] I searched the open pull requests for these files and for `barstat`. Related: #2792 and #3385 repair the first Clippy gate on `main` (unused imports and the like, #2019); #2772 covers other `victory-gpu` findings, including `list.rs:2692`; none removes these six borrows.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 20:00:12 +00:00
github-bot changed title from Diagnostics build: mb at module scope, and the stage spans stop hiding timing() to Diagnostics-only barrier stats: six needless borrows the all-features gate refuses 2026-11-30 00:34:23 +00:00
github-bot force-pushed github-bot/gh-3086 from ff26bab309 to 4114448aa1 2026-11-30 00:34:25 +00:00 Compare
This pull request can be merged automatically.
This branch is out-of-date with the base branch
The changes on this branch are already on the target branch. This will be an empty commit.
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/3086/head:github-bot/gh-3086'
git switch 'github-bot/gh-3086'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3086'
git switch 'github-bot/gh-3086'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3086'
git switch 'github-bot/gh-3086'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3086'
git switch 'main'
git merge --squash 'github-bot/gh-3086'
git switch 'main'
git merge --ff-only 'github-bot/gh-3086'
git switch 'main'
git merge 'github-bot/gh-3086'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!3086
No description provided.