Skip to content

Commit

Permalink
Ignore unknown attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
AldaronLau committed Jun 18, 2024
1 parent c2b115a commit 2188d9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ enum TestEnum {
}

impl TestEnum {
const VARIANT_ARRAY: [TestEnum; 3] =
const VARIANT_ARRAY: [TestEnum; Self::VARIANT_COUNT] =
Self::variant_array::<{ Self::VARIANT_COUNT }>();
const VARIANT_COUNT: usize = Self::variant_count();
}
Expand Down
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ fn impl_enum_functions(

for attr in attrs {
let Meta::List(list) = attr.meta else {
return Err(Error::new(
attr.bracket_token.span.join(),
"expected attribute list",
));
continue;
};
let path = &list.path;

Expand Down

0 comments on commit 2188d9b

Please sign in to comment.