Clippy: annotate the two bare transmutes (#315) #322

Open
Arboff wants to merge 1 commit from upstream-pr/322 into a-publier
Arboff commented 2026-11-26 20:08:11 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by Arboff on 2026-11-26T20:08:11Z.


Fixes #315.

cargo clippy --workspace --all-targets --locked -- -D warnings fails on a-publier (cd8dfc0) with clippy::missing_transmute_annotations at three calls in two places. This PR names the source and destination types on each one:

  • crates/victory-loader/src/descriptor_sites.rs:277 (test): transmute(plain) / transmute(hooked) → transmute::<usize, F>(…). The (F, F) annotation on the tuple binding wasn't enough for the lint.
  • crates/victory-gpu/src/host/panel.rs:386: transmute::<_, NtQuery>(p) → transmute::<unsafe extern "system" fn() -> isize, NtQuery>(p). That source type is the FARPROC that GetProcAddress returns, after ?.

The types are the ones Clippy suggests, and the behavior doesn't change. No other bare transmute in the workspace is flagged: the rest bind to an annotated let, which the lint accepts.

Testing: I couldn't run Clippy locally because there's no Rust toolchain on this machine, so this PR's Clippy job is the check. The overall check job may still fail because of #314, the depth-bounds test that fails on the GPU-less runner. This PR doesn't touch that.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:issue:5516495645 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/322). Originally posted by [Arboff](https://github.com/Arboff) on 2026-11-26T20:08:11Z. --- Fixes #315. `cargo clippy --workspace --all-targets --locked -- -D warnings` fails on `a-publier` (cd8dfc0) with `clippy::missing_transmute_annotations` at three calls in two places. This PR names the source and destination types on each one: - `crates/victory-loader/src/descriptor_sites.rs:277` (test): `transmute(plain)` / `transmute(hooked)` → `transmute::<usize, F>(…)`. The `(F, F)` annotation on the tuple binding wasn't enough for the lint. - `crates/victory-gpu/src/host/panel.rs:386`: `transmute::<_, NtQuery>(p)` → `transmute::<unsafe extern "system" fn() -> isize, NtQuery>(p)`. That source type is the `FARPROC` that `GetProcAddress` returns, after `?`. The types are the ones Clippy suggests, and the behavior doesn't change. No other bare `transmute` in the workspace is flagged: the rest bind to an annotated `let`, which the lint accepts. **Testing:** I couldn't run Clippy locally because there's no Rust toolchain on this machine, so this PR's Clippy job is the check. The overall `check` job may still fail because of #314, the depth-bounds test that fails on the GPU-less runner. This PR doesn't touch that. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
lvndrpup commented 2026-11-27 03:54:00 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by lvndrpup on 2026-11-27T03:54:00Z.


The same two annotations are now in a-publier: #330 made them in 41aec5e ("ci: fix Clippy warnings on a-publier (#315)"), merged as 392766f, and #315 is closed. On 4eb6cfd, panel.rs:383 and descriptor_sites.rs:277 read exactly as this PR has them, so merging it would change nothing.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:comment:7209359208 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/322#issuecomment-7209359208). Originally posted by [lvndrpup](https://github.com/lvndrpup) on 2026-11-27T03:54:00Z. --- The same two annotations are now in `a-publier`: #330 made them in `41aec5e` ("ci: fix Clippy warnings on a-publier (#315)"), merged as `392766f`, and #315 is closed. On `4eb6cfd`, `panel.rs:383` and `descriptor_sites.rs:277` read exactly as this PR has them, so merging it would change nothing.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/322:upstream-pr/322'
git switch 'upstream-pr/322'

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.

git switch 'a-publier'
git merge --no-ff 'upstream-pr/322'
git switch 'upstream-pr/322'
git rebase 'a-publier'
git switch 'a-publier'
git merge --ff-only 'upstream-pr/322'
git switch 'upstream-pr/322'
git rebase 'a-publier'
git switch 'a-publier'
git merge --no-ff 'upstream-pr/322'
git switch 'a-publier'
git merge --squash 'upstream-pr/322'
git switch 'a-publier'
git merge --ff-only 'upstream-pr/322'
git switch 'a-publier'
git merge 'upstream-pr/322'
git push origin 'a-publier'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Belobug/VIctory-Belobug-AMD!322
No description provided.