-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the span from ast::Lit
.
#101516
Remove the span from ast::Lit
.
#101516
Conversation
In the most common case, the `Lit` is stored within an `Expr`, which records the same span. For other cases, we can store the span next to the `Lit`.
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 6d478fd with merge 38d57e8411697109f017e5190da471ee297dbd52... |
☀️ Try build successful - checks-actions |
Queued 38d57e8411697109f017e5190da471ee297dbd52 with parent 8c41305, future comparison URL. |
Finished benchmarking commit (38d57e8411697109f017e5190da471ee297dbd52): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
I probably won't have a chance to look at this for a few days, but just wanted to note I'd like a chance to take a closer look at potential rustfmt impacts before this gets merged if possible.
This sounds fair to me, it's just out of an abundance of caution from the rustfmt perspective that I want to dive in because people always seem to put comments in weird places, and rustfmt relies heavily on precise spans in the AST to avoid dropping (or butchering) comments, and unfortunately we don't always have robust tests for such cases |
No problem. I'm pretty sure I won't have broken everything because I
The one counterexample is |
I have moved this into #101562, where it's one of several changes required to shrink |
In the most common case, the
Lit
is stored within anExpr
, which records the same span.For other cases, we can store the span next to the
Lit
.r? @ghost