Skip to content

Commit

Permalink
Allow cfg attributes (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
speelbarrow authored Jan 11, 2025
1 parent 23703fe commit 7c8d9d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ouroboros_macro/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ pub fn parse_struct(def: &ItemStruct) -> Result<StructInfo, Error> {
return Err(Error::new(p.span(), "Unsupported attribute".to_string()));
}
let name = p[0].ident.to_string();
let good = matches!(&name[..], "clippy" | "allow" | "deny" | "doc");
let good = matches!(&name[..], "clippy" | "allow" | "deny" | "doc" | "cfg");
if good {
attributes.push(attr.clone())
} else if name == "derive" {
Expand Down

0 comments on commit 7c8d9d2

Please sign in to comment.