We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46d77e1 commit f37a82aCopy full SHA for f37a82a
crates/stackable-versioned-macros/src/attrs/variant.rs
@@ -46,14 +46,13 @@ impl VariantAttributes {
46
errors.handle(self.common.validate(&self.ident, &ItemType::Variant));
47
48
// Validate names of renames
49
- if !self
50
- .common
51
- .renames
52
- .iter()
53
- .all(|r| r.from.is_case(Case::Pascal))
54
- {
55
- errors
56
- .push(Error::custom("renamed variants must use PascalCase").with_span(&self.ident));
+ for rename in &self.common.renames {
+ if !rename.from.is_case(Case::Pascal) {
+ errors.push(
+ Error::custom("renamed variant must use PascalCase")
+ .with_span(&rename.from.span()),
+ )
+ }
57
}
58
59
errors.finish()?;
0 commit comments