Turn undocumented_unsafe_blocks back on: six SAFETY comments the lint can read #30
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/30"
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 fxceless/victory-fork. Originally posted by viktoschi on 2026-11-24T20:35:11Z.
What this does
Turns
undocumented_unsafe_blocksback on. The workspace comment said elevenblocks in the newer GPU code still lacked a safety comment; six were still
reported, and all six had a comment — just not one the lint reads.
victory-gpu/src/host.rs:5370SAFETY:above belonged to thezeroed()on the line before; theVirtualQuerycall had none of its ownvictory-gpu/src/indirect.rs:376SAFETY:for the whole block sat above the diagnosticslets, not above theunsafevictory-gpu/src/indirect.rs:701SAFETY (each):— the lint wantsSAFETY:inplace.rs:617,:685,:760SAFETY (the whole function):— same form problemEach comment now states the same invariant as before, in the form the lint
recognises; the clamp's comment moved down to its block and the sparse read's
VirtualQuerygot its own.Cargo.toml:so the next block added without a
SAFETY:comment fails-D warnings.Checks
cargo clippy --workspace --all-targets --locked -- -D warnings— cleancargo clippy --workspace --all-targets --all-features --locked -- -D warnings— cleancargo test --workspace --locked— all green (211 passed, 2 ignored; the GPU tests ran on an RTX 3090)cargo xtask install-hooks+ the pre-commit asset policy on this commit — 4 files okNo code changed: comments and the lint level only.
Not in this PR
type_complexity(7 sites) andneedless_range_loop(9 sites) stay allowed —those want type aliases and loop rewrites in the translator, not a comment.
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.