Turn undocumented_unsafe_blocks back on: six SAFETY comments the lint can read #30
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!30
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@viktoschi on GitHub · 2026-11-24 20:35 UTC · original
viktoschi:tidy-unsafe-safety-comments→main· +18 −12 · 4 files · 1 commits · openWhat 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
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.