Uh oh!
There was an error while loading. Please reload this page.
Remove token::{Open,Close}Delim - #139897
Conversation
This comment has been minimized.
This comment has been minimized.
f6f6a74 to
8318b85Compare
This comment has been minimized.
This comment has been minimized.
8318b85 to
16cfe17Compare
This comment has been minimized.
This comment has been minimized.
16cfe17 to
d6622d6Comparennethercote
commented
Apr 16, 2025
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
… r=<try>
Remove `token::{Open,Close}Delim`
r? `@ghost`bors
commented
Apr 16, 2025
bors
commented
Apr 16, 2025
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
rust-timer
commented
Apr 16, 2025
Finished benchmarking commit (448bb73): comparison URL. Overall result: ✅ improvements - 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 is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.4%)This 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.
CyclesResults (primary -0.6%)This 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 776.859s -> 775.51s (-0.17%) |
d6622d6 to
d507b13Compare
This comment was marked as outdated.
This comment was marked as outdated.
nnethercote
commented
Apr 17, 2025
Slight perf wins too, that's nice. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
rustbot
commented
Apr 17, 2025
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt Some changes occurred in compiler/rustc_attr_parsing |
rustbot
commented
Apr 17, 2025
Reminder, once the PR becomes ready for a review, use |
d507b13 to
642cfbaComparennethercote
commented
Apr 17, 2025
I added two new commits.
|
nnethercote
commented
Apr 17, 2025
@rustbot ready |
Can you drop the |
642cfba to
a35c855Comparennethercote
commented
Apr 18, 2025
Done. |
petrochenkov
commented
Apr 18, 2025
r=me after squashing commits. |
By replacing them with `{Open,Close}{Param,Brace,Bracket,Invisible}`.
PR rust-lang#137902 made `ast::TokenKind` more like `lexer::TokenKind` by
replacing the compound `BinOp{,Eq}(BinOpToken)` variants with fieldless
variants `Plus`, `Minus`, `Star`, etc. This commit does a similar thing
with delimiters. It also makes `ast::TokenKind` more similar to
`parser::TokenType`.
This requires a few new methods:
- `TokenKind::is_{,open_,close_}delim()` replace various kinds of
pattern matches.
- `Delimiter::as_{open,close}_token_kind` are used to convert
`Delimiter` values to `TokenKind`.
Despite these additions, it's a net reduction in lines of code. This is
because e.g. `token::OpenParen` is so much shorter than
`token::OpenDelim(Delimiter::Parenthesis)` that many multi-line forms
reduce to single line forms. And many places where the number of lines
doesn't change are still easier to read, just because the names are
shorter, e.g.:
```
- } else if self.token != token::CloseDelim(Delimiter::Brace) {
+ } else if self.token != token::CloseBrace {
```a35c855 to
bf8ce32Comparennethercote
commented
Apr 20, 2025
I squashed the commits. @bors r=petrochenkov |
bors
commented
Apr 20, 2025
bors
commented
Apr 22, 2025
bors
commented
Apr 22, 2025
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing d6c1e45 (parent) -> fae7785 (this PR) Test differencesShow 20 test diffs20 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard fae7785b60ea7fe1ad293352c057a5b7be73d245 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
rust-timer
commented
Apr 22, 2025
Finished benchmarking commit (fae7785): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 0.3%, secondary 3.4%)This 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.
CyclesResults (primary -0.6%, secondary 1.8%)This 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 774.01s -> 775.257s (0.16%) |
By replacing them with
{Open,Close}{Param,Brace,Bracket,Invisible}.PR #137902 made
ast::TokenKindmore likelexer::TokenKindbyreplacing the compound
BinOp{,Eq}(BinOpToken)variants with fieldlessvariants
Plus,Minus,Star, etc. This commit does a similar thingwith delimiters. It also makes
ast::TokenKindmore similar toparser::TokenType.This requires a few new methods:
TokenKind::is_{,open_,close_}delim()replace various kinds ofpattern matches.
Delimiter::as_{open,close}_token_kindare used to convertDelimitervalues toTokenKind.Despite these additions, it's a net reduction in lines of code. This is
because e.g.
token::OpenParenis so much shorter thantoken::OpenDelim(Delimiter::Parenthesis)that many multi-line formsreduce to single line forms. And many places where the number of lines
doesn't change are still easier to read, just because the names are
shorter, e.g.:
r? @petrochenkov