Diagnostics-only barrier stats: six needless borrows the all-features gate refuses #3086
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3086"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by TheSovietWaffle on 2026-11-29T19:56:07Z.
The build half of this is in
mainnow (41adb55, "Diagnostics build compiles again"): thembhelper inlog_heap_elsewhereandself::timing()at the three submission sites. What is left is the second gate: with the diagnostics feature on,clippy -D warningsrefuses sixbarstat::rbcalls 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: twocrate::barstat::rb(&list, …)in the read-back capture.crates/victory-gpu/src/compose.rs: fourrb(&l, …)/rb(&cmds, …)in the display-plane tests.barstat::rbtakes&ID3D12GraphicsCommandList, so the extra&is a reference to a reference;clippy::needless_borrowsrefuses it under-D warnings. They sit behindfeature = "diagnostics", so no earlier lint run could see them: the plain Clippy step never compiles them, and the--all-featuresstep 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 remainingneedless_borrowsin that run iscrates/victory-gpu/src/list.rs:2692(handles), which is not abarstatcall and not touched here.cargo check -p victory-gpu --tests --profile diag --features diagnostics:Finished(with41adb55in the base).&removals in diagnostics-only code.Checked for overlap
barstat. Related: #2792 and #3385 repair the first Clippy gate onmain(unused imports and the like, #2019); #2772 covers othervictory-gpufindings, includinglist.rs:2692; none removes these six borrows.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.