Skip to content

Commit afcef1b

Browse files
committed
fix: Report variant name validation error at the correct span
1 parent cee9bd5 commit afcef1b

File tree

1 file changed

+2
-1
lines changed
  • crates/stackable-versioned-macros/src/attrs

1 file changed

+2
-1
lines changed

crates/stackable-versioned-macros/src/attrs/variant.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ impl VariantAttributes {
5252
.iter()
5353
.all(|r| r.from.is_case(Case::Pascal))
5454
{
55-
errors.push(Error::custom("renamed variants must use PascalCase"));
55+
errors
56+
.push(Error::custom("renamed variants must use PascalCase").with_span(&self.ident));
5657
}
5758

5859
errors.finish()?;

0 commit comments

Comments
 (0)