-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: Unindent doc fragments on Attributes
construction
#96282
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
Conversation
Some changes occurred in cc @camelid |
r? @notriddle (rust-highfive has picked a reviewer for you, use r? to override) |
Thanks for working on this! I think it'll be positive for perf so let's confirm it! @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 7803a41 with merge cf182b12d75c173ba0e3fa9e97529a6dece943da... |
☀️ Try build successful - checks-actions |
Queued cf182b12d75c173ba0e3fa9e97529a6dece943da with parent 1dec35a, future comparison URL. |
Finished benchmarking commit (cf182b12d75c173ba0e3fa9e97529a6dece943da): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking 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 Footnotes |
I wonder if there is a possibility that attributes are cleaned more than once in some cases... |
Maybe. |
Since it was a pass, there was no need for it. Maybe you might know more about this @camelid ? |
The regression is only on artificial benchmarks (I include I'm not sure why there's a regression; I would've expected perf improvement. The only thing I can think of is what you said, that it's being cleaned multiple times. |
Well, we are applying |
I'm not sure it's only the new types getting unindented that have this impact. I think it's called more than once, but let's worry about it in another PR as this is already a nice improvement. Can you open an issue to investigate about this so we don't forget please @petrochenkov ? @bors: r+ rollup=never |
📌 Commit 7803a41 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (8b23930): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Footnotes |
Given there is an issue to investigate this further and the regressions are relatively small and confined to non-real-world crates, I'll mark this as triaged. @rustbot label: +perf-regression-triaged |
Attributes
can be constructed at arbitrary points, even after theunindent_comments
pass.Attributes
that are constructed too late end up unindented.All doc fragments need to be eventually indented before use, so there are no reasons to not do this immediately during their construction.
Fixes https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/.60unindent_comments.60.20cannot.20work.20as.20a.20separate.20pass.
I'm not sure how to make a minimized reproduction, but unindenting the fragments during their construction should fix the issue.. by construction, and I also verified that all doc strings now hit the
resolver_caches.markdown_links
cache in #94857.