docs(ast_tools): correct comments concerning enum inheritance#24395
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
Updates documentation comments in the AST tools derive generators to reflect the current enum-variant inheritance mechanism (INHERIT marker variants) after removal of the older inherit_variants! macro, keeping the rationale for delegation clear and up to date.
Changes:
- Refresh and shorten comments in the
estreederive generator describing delegation for inherited variants. - Refresh and reformat comments in the
clone_inderive generator describing delegation viato_*casts andFromimpls. - Minor whitespace tweaks around inherited-variant arm generation blocks.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tasks/ast_tools/src/derives/estree.rs | Updates comments explaining how INHERIT-based inherited variants delegate ESTree serialization to reduce duplicated match arms/binary size. |
| tasks/ast_tools/src/derives/clone_in.rs | Updates comments explaining how INHERIT-based inherited variants delegate cloning via to_* + From to avoid duplicated match arms/binary bloat. |
Merge activity
|
Follow-on after #23555. Since that PR was written, the `inherit_variants!` macro was removed, so some of the comments were out of date. Bring those comments up to date. Also shorten the comments a bit and reformat them.
e049e5c to
c15c423
Compare

Follow-on after #23555.
Since that PR was written, the
inherit_variants!macro was removed, so some of the comments were out of date.Bring those comments up to date. Also shorten the comments a bit and reformat them.