refactor(estree): add #[repr(transparent)] to config structs#13212
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
This PR refactors configuration structs in the estree module by adding #[repr(transparent)] attributes to enable potential performance optimizations. The change leverages Rust's transparent representation for single-field structs, which may improve memory layout and function call efficiency.
- Adds
#[repr(transparent)]attribute to all config structs containing only a singlerangesfield - Targets four configuration structs:
ConfigTS,ConfigJS,ConfigFixesTS, andConfigFixesJS
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
CodSpeed Instrumentation Performance ReportMerging #13212 will not alter performanceComparing Summary
|
|
Minor refactor only, so merging without review. |
Merge activity
|
The `Config*` structs only contain a single field, so mark them `#[repr(transparent)]`. Has no effect on perf, but it doesn't hurt, so on balance I think best to do it.
1b01fae to
3f92fa8
Compare

The
Config*structs only contain a single field, so mark them#[repr(transparent)].Has no effect on perf, but it doesn't hurt, so on balance I think best to do it.