Skip to content

Commit

Permalink
refactor(ast): reduce #[cfg_attr] boilerplate in AST type defs (#4375)
Browse files Browse the repository at this point in the history
Remove a ton of `#[cfg_attr(feature = "serialize", serde(...))]` boilerplate from AST type definitions.

Before: `#[cfg_attr(feature = "serialize", serde(flatten))]`
After: `#[serde(flatten)]`

This is a reprise of #2669, which was later reverted, but this time doing it using our existing zero-cost `#[ast]` dummy macro attr, so no compile time penalty this time around.

This makes no difference to either runtime or compile time behavior, purely removes the `cfg_attr` boilerplate and makes the code easier to read.
  • Loading branch information
overlookmotel committed Jul 20, 2024
1 parent d345b84 commit abfccbd
Show file tree
Hide file tree
Showing 5 changed files with 455 additions and 470 deletions.
Loading

0 comments on commit abfccbd

Please sign in to comment.