From 255fd76c527026387b0f074d5a3f9808037ca449 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Mon, 9 Nov 2026 16:38:13 +1300 Subject: Fix source attribution for IntermediateError::ValueTooWide Previously, the error would be displayed with two identical attributions to the source span of the word template field, which was redundant and confusing. Now, the second attribution points instead to the source of the value being inserted into that field, which was the original intended behaviour. --- src/stages/intermediate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stages') diff --git a/src/stages/intermediate.rs b/src/stages/intermediate.rs index e48f31b..1a26adf 100644 --- a/src/stages/intermediate.rs +++ b/src/stages/intermediate.rs @@ -208,7 +208,7 @@ impl IntermediateParser { let value_width = width(field_value); if field.width() < value_width { let error = IntermediateError::ValueTooWide(field.width(), value_width); - let new_source = field_source.wrap(result.source); + let new_source = field_source.wrap(result.value.source); self.errors.push(Tracked::from(error, new_source)); } else { let mut bits_mapped = 0; -- cgit v1.3.1