Uh oh!
There was an error while loading. Please reload this page.
Remove token::Lit from ast::Lit. - #101528
Conversation
`token::Lit` contains a `kind` field that indicates what kind of literal it is. `ast::Lit` currently wraps a `token::Lit` but also has its own `kind` field. Which means that `ast::Lit` encodes the literal kind in two different ways. This commit changes `ast::Lit` so it no longer wraps `token::Lit`. It now contains the `symbol` and `suffix` fields from `token::Lit`, but not the `kind` field, eliminating the redundancy. This requires extending `ast::LitKind::ByteStr` to include a `StrStyle` to properly distinguish between cooked and raw byte string literals at the `ast::Lit` level.
rustbot
commented
Sep 7, 2022
Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
nnethercote
commented
Sep 7, 2022
I'm not expecting much performance effect, but let's check anyway: @bors try @rust-timer queue |
rust-timer
commented
Sep 7, 2022
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Sep 7, 2022
⌛ Trying commit c16f710 with merge 1c91510426b7b23caa649d60e0f31de9e5b09678... |
bors
commented
Sep 7, 2022
☀️ Try build successful - checks-actions |
rust-timer
commented
Sep 7, 2022
Queued 1c91510426b7b23caa649d60e0f31de9e5b09678 with parent 0568b0a, future comparison URL. |
rust-timer
commented
Sep 8, 2022
Finished benchmarking commit (1c91510426b7b23caa649d60e0f31de9e5b09678): comparison URL. Overall result: ❌✅ regressions and improvements - 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
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 |
nnethercote
commented
Sep 8, 2022
The @rustbot label: +perf-regression-triaged |
nnethercote
commented
Sep 8, 2022
I have moved this into #101562, where it's one of several changes required to shrink |
token::Litcontains akindfield that indicates what kind of literal it is.ast::Litcurrently wraps atoken::Litbut also has its ownkindfield. Which means thatast::Litencodes the literal kind in two different ways.This commit changes
ast::Litso it no longer wrapstoken::Lit. It now contains thesymbolandsuffixfields fromtoken::Lit, but not thekindfield, eliminating the redundancy. This requires extendingast::LitKind::ByteStrto include aStrStyleto properly distinguish between cooked and raw byte string literals at theast::Litlevel.r? @petrochenkov