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

Open
github-bot wants to merge 1 commit from github-bot/gh-322 into a-publier AGit
Owner

@⁠Arboff on GitHub · 2026-11-26 20:08 UTC · original
Arboff:fix/clippy-transmute-annotations → a-publier · +2 −2 · 2 files · 1 commits · open

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

**@⁠Arboff** on GitHub · 2026-11-26 20:08 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/322) `Arboff:fix/clippy-transmute-annotations` → `a-publier` · +2 −2 · 2 files · 1 commits · open 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)
clippy::missing_transmute_annotations fails the Clippy job on a-publier
under -D warnings. Name the source and destination types at both calls:
usize -> F in the descriptor_sites test, and GetProcAddress's
fn() -> isize -> NtQuery in the panel's CPU meter. No behavior change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:12:52 +00:00
Author
Owner

@⁠lvndrpup on GitHub · 2026-11-27 03:54 UTC · original

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.

**@⁠lvndrpup** on GitHub · 2026-11-27 03:54 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/322#issuecomment-7209359208) 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 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/322/head:github-bot/gh-322'
git switch 'github-bot/gh-322'

Merge

Merge the changes and update on Forgejo.
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-322'
git switch 'github-bot/gh-322'
git rebase 'a-publier'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-322'
git switch 'github-bot/gh-322'
git rebase 'a-publier'
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-322'
git switch 'a-publier'
git merge --squash 'github-bot/gh-322'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-322'
git switch 'a-publier'
git merge 'github-bot/gh-322'
git push origin 'a-publier'
This discussion has been locked. Commenting is limited to contributors.
No description provided.