From dac5e99952be12ffca8473234420c5e91de54a54 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 03:24:44 +0000 Subject: [PATCH] translate: count per-lane fetched descriptors as loaded The resource tally in `victory translate` matched every `Source` variant by hand, so the new `Select`, `Fetched` and `Lanes` kinds left it non-exhaustive and `cargo check -p victory` failed. A fetched descriptor is counted with the loaded ones; selections and per-lane choices are never leaves. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66 --- apps/victory/src/translate.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/victory/src/translate.rs b/apps/victory/src/translate.rs index dcaf924..8e9c6e2 100644 --- a/apps/victory/src/translate.rs +++ b/apps/victory/src/translate.rs @@ -547,7 +547,7 @@ fn tally_resources(p: &NativeProgram, r: &resource::Resources, t: &mut Tally) { let mut traced = HashSet::new(); for leaf in r.descriptors.iter().flat_map(|d| d.source.leaves()) { let a = match *leaf { - resource::Source::Loaded { load, .. } => { + resource::Source::Loaded { load, .. } | resource::Source::Fetched { load, .. } => { t.loaded += 1; address(load) } @@ -560,7 +560,11 @@ fn tally_resources(p: &NativeProgram, r: &resource::Resources, t: &mut Tally) { t.constant += 1; None } - resource::Source::Phi { .. } => unreachable!("leaves are no phis"), + resource::Source::Phi { .. } + | resource::Source::Select { .. } + | resource::Source::Lanes { .. } => { + unreachable!("leaves are no phis, selects or per-lane choices") + } }; // Heaps hold dynamic resources, which no used entry lists; code // tables are no root parameter.