-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Show note where the macro failed to match #103439
Conversation
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 03254db9f4cfd213bb6ba05fa435097b51aabe89 with merge 1b60c6801809977dd5201067b34e8f2ffb884eb0... |
☀️ Try build successful - checks-actions |
Queued 1b60c6801809977dd5201067b34e8f2ffb884eb0 with parent 9be2f35, future comparison URL. |
Finished benchmarking commit (1b60c6801809977dd5201067b34e8f2ffb884eb0): comparison URL. Overall result: ❌ regressions - 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 |
Yes, as expected, the naive implementation is a regression as this path is very hot. I'll reimplement the diagnostic in a different way that keeps all new code in the cold diagnostics path. |
r? compiler |
this needs some more work and won't be ready for review for a while @rustbot author |
03254db
to
277bcda
Compare
This comment has been minimized.
This comment has been minimized.
5e8600a
to
a9d7d01
Compare
@bors try @rust-timer queue |
📌 Commit a34d1cfde326eec323e61f8701e0fac780b322e2 has been approved by It is now in the queue for this repository. |
@estebank oh, I actually wanted to fix a few more diagnostics here before putting it up for review again but I've changed my mind on that, I think merging this is fine as is.. but can you |
This shows a small note on what the macro matcher was currently processing to aid with "no rules expected the token X" errors.
a34d1cf
to
7e7c11c
Compare
So, this should be fine now. |
@bors r=estebank |
@bors rollup- |
Retry failed macro matching for diagnostics When a declarative macro fails to match, retry the matching to collect diagnostic info instead of collecting it on the fly in the hot path. Split out of #103439. You made a bunch of changes to declarative macro matching, so r? `@nnethercote` This change should produce a few small perf wins: rust-lang/rust#103439 (comment)
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#103439 (Show note where the macro failed to match) - rust-lang#103734 (Adjust stabilization version to 1.65.0 for wasi fds) - rust-lang#104148 (Visit attributes of trait impl items during AST validation) - rust-lang#104241 (Move most of unwind's build script to lib.rs) - rust-lang#104258 (Deduce closure signature from a type alias `impl Trait`'s supertraits) - rust-lang#104296 (Walk types more carefully in `ProhibitOpaqueTypes` visitor) - rust-lang#104309 (Slightly improve error message for invalid identifier) - rust-lang#104316 (Simplify suggestions for errors in generators.) - rust-lang#104339 (Add `rustc_deny_explicit_impl`) Failed merges: - rust-lang#103484 (Add `rust` to `let_underscore_lock` example) r? `@ghost` `@rustbot` modify labels: rollup
Hyped for this one |
Retry failed macro matching for diagnostics When a declarative macro fails to match, retry the matching to collect diagnostic info instead of collecting it on the fly in the hot path. Split out of #103439. You made a bunch of changes to declarative macro matching, so r? `@nnethercote` This change should produce a few small perf wins: rust-lang/rust#103439 (comment)
Retry failed macro matching for diagnostics When a declarative macro fails to match, retry the matching to collect diagnostic info instead of collecting it on the fly in the hot path. Split out of #103439. You made a bunch of changes to declarative macro matching, so r? `@nnethercote` This change should produce a few small perf wins: rust-lang/rust#103439 (comment)
When feeding the wrong tokens, it used to fail with a very generic error that wasn't very helpful. This change tries to help by noting where specifically the matching went wrong.