rustc_parse: Move AST -> TokenStream conversion logic to rustc_ast#97251
Merged
bors merged 2 commits intorust-lang:masterfrom May 22, 2022
Merged
rustc_parse: Move AST -> TokenStream conversion logic to rustc_ast#97251bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Contributor
|
Very nice: +130 -298 @bors r+ |
Collaborator
|
📌 Commit d0607449eac63ec1fcb400a77968bc399309e609 has been approved by |
fbstj
reviewed
May 21, 2022
Contributor
Author
|
@bors r=nnethercote |
Collaborator
|
📌 Commit 09b4c7c has been approved by |
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
Collaborator
|
Finished benchmarking commit (4bb4dc4): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Contributor
|
A small performance win too, nice. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the past falling back to reparsing pretty-printed strings was common, so some of this logic had to live in
rustc_parse, but now the reparsing fallback is only used in two corner cases so we can move this logic torustc_astwhich makes many things simpler.It also helps to fix
MacArgs::inner_tokensforMacArgs::Eqwith non-literal expressions, which is done in the second commit.r? @nnethercote