There’s a warning about an unused method ranged in crates/victory-gpu/src/shadow.rs:7197. This is just a dead code warning — the build will still succeed. #4121
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 HBF7678 on 2026-11-30T16:22:17Z.
Compiling clap v4.6.9
Compiling victory-game v0.1.0 (C:\Users\Admin\Downloads\Xbox_game_build\VIctory-NVIDIA\crates\victory-game)
warning: method
rangedis never used--> crates\victory-gpu\src\shadow.rs:7197:8
|
5822 | impl Shadow {
| ----------- method in this implementation
...
7197 | fn ranged(&self, from: usize, to: usize) -> u64 {
| ^^^^^^
|
= note:
#[warn(dead_code)](part of#[warn(unused)]) on by defaultCompiling victory-hle v0.1.0 (C:\Users\Admin\Downloads\Xbox_game_build\VIctory-NVIDIA\crates\victory-hle)
Building [=======================> ] 118/120: victory-gpu
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-30T16:22:28Z.
Please attach both logs from the run that went wrong. Without them we can only guess. Paste
%LOCALAPPDATA%into the address bar of File Explorer to get there.%LOCALAPPDATA%\victory\logs\: the newestvictory-nvidia-play-<date>-<time>-<number>.log(fromvictory.exe) orvictory-nvidia-<date>-<time>.log(from the script launcher). The window shows its path at the start, on the lineLog: ....%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newestvictory-<date>-<time>-<number>.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\.Also say which GPU, Windows version (10 or 11)
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by HBF7678 on 2026-11-30T16:23:41Z.
Win 11,rtx 5060 8gb, 32 gb ram
victory-nvidia-20261130-214917.log
The game didnt crash
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by cloph-dsp on 2026-11-30T16:32:56Z.
Finding: the
dead_codewarning onShadow::ranged(shadow.rs:7197 in the build that reported it) is real on currentmain, and the method is unreachable for a reason that looks like a bug rather than leftovers.On
2c28b27d(my shallowmain)rangedsits at shadow.rs:4215 and keeps two callers, so it is not dead by construction:shadow.rs:4203, insidenothing_new, runs unconditionally for a guarded range.shadow.rs:4319,copy_stale, runs only whencrate::watch::light()is true — andwatch::light()isVICTORY_LIGHT_REFRESH, on unless"0". So in a default build both callers are live.The line number in the warning (7197) does not exist in this tree, so that build carries a longer shadow.rs than
2c28b27d. The likeliest reading is that the warning's build is ahead of this checkout and something above it changed the reachability, so the warning is worth a look on the exact commit that produced it rather than a blanket#[allow(dead_code)].Concretely, a plausible cause in this file:
refresh_check(shadow.rs:4259) is itself an env-gated diagnostic (VICTORY_REFRESH_CHECK=1) yet is called unconditionally fromupdate_free, whilecopy_stale'srangeduse is behindwatch::light(). If a build compiles theVICTORY_LIGHT_REFRESHpath out (or the reporter's tree moved that gate into a#[cfg]),copy_stalestops usingrangedand only thenothing_newcaller keeps it alive — which is exactly when the compiler starts calling the method unused if that caller is also gated.cargo check --locked -p victory-gpu --libon2c28b27dat HEAD produces nodead_codewarning forranged(only seven unrelatedfetch_updatedeprecations), so I cannot reproduce it here and have not changed anything.Two things would settle it: the commit hash of the build that printed the warning, and whether the reporter's shadow.rs line 7197 sits above or below the
watch::light()call incopy_stale. If the answer is "below", the gate was moved and the fix is to keep therangedlookup live (e.g. letcopy_staletake it unconditionally and havelight()short-circuit inside), not to silence the warning.AI-assisted: Hy4 flash. No game data, assets, extracted shaders or DRM used.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Raesdf on 2026-11-30T17:00:15Z.
Hi, I checked this in my checkout:
Shadow::rangedhas no callers here.nothing_newusesranged_lockfree_partsandcopy_staleusesranged_partsdirectly, so searching for.ranged(gives 0 results.Could you share the commit hash of the build that printed the warning?
And on current main, is
rangedstill called fromnothing_new/copy_stale, or is it dead there too?