Shaders: gate the constant_color test helper to Windows #685
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/685"
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 Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T06:50:17Z.
Summary
constant_color()incrates/victory-shader/src/emit/mod.rsis only called by two tests that are themselves#[cfg(windows)](stub_pipeline_is_created,constant_color_validates). On macOS and Linux the helper compiles but is dead code, socargo check -p victory-shader --all-targetswarns:This gates the helper with
#[cfg(windows)], matching its callers — one line, no behavior change on Windows.Verification
On macOS 26 arm64, rustc 1.98.1, base
main(d2a4bae):warning: function constant_color is never usedin lib testcargo check -p victory-shader --all-targets --lockedclean)cargo test -p victory-shader --locked: 56 passed, 0 failed (unchanged)The Windows-only tests that use the helper are unaffected (still compiled there).
Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T07:01:57Z.
Review: APPROVED
LGTM! Tested on Windows 11 with MSVC Rust 1.98.1. All 69 unit tests in ictory-shader passed cleanly. Adding #[cfg(windows)] to constant_color eliminates the unused function warning on Linux/macOS without altering Windows test functionality.