-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
rustdoc: Remove 'need_backline' field from DocFragment
#92095
Conversation
Some changes occurred in cc @camelid |
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) soon. Please see the contribution instructions for more information. |
Just having noticed #92084, this PR may become obsolete. To clarify, lines 945-950 and 960-962 would be deleted, so the only change in the end would be to unconditionally push a newline. I suppose that "mostly obsolete" would've fit better. |
@vacuus here's a guide on fixing conflicts: https://rustc-dev-guide.rust-lang.org/git.html#rebasing-and-conflicts I'm not sure what you mean by obsolete - this is exactly the sort of change I was hoping to see when I opened the issue :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Could you now remove the need_backline
field everywhere in types.rs
? That should give a big memory improvement :)
src/librustdoc/clean/types.rs
Outdated
// multiple lines in case of `#[doc = ""]`). | ||
// * Adding backlines between `DocFragment`s and adding an extra one if required (stored in the | ||
// `need_backline` field). | ||
// Note: remove the trailing newline where appropriate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're rewriting these comments, can you make them doc-comments so they show up on doc.rust-lang.org/rustdoc?
I confess that I'm stumped on the rebase. Right after cloning my fork, I did |
@vacuus try |
DocFragment
Sorry to bother you more, but do I just allow the changes I made? For example, this is one of the conflicts: since the goal is to remove 'need_backline`, the if let would be deleted. There shouldn't be any problem with me deleting the whole snippet and considering that conflict resolved, right?
|
Yup! That whole block shouldn't be needed any more. |
All you need to do is delete the conflict marker arrows and made sure the code that is left behind is what you want. So if you want to delete the section that has conflicts, just delete it. |
This comment has been minimized.
This comment has been minimized.
The size assertion at line 923 ( |
There seem to be quite a few compilation errors due to a |
Wait, why did you change that in this PR? I thought this was only changing need_backline. |
I guess I thought that #92078 was already merged and I should update this accordingly. My bad. I'll revert those changes. |
This comment has been minimized.
This comment has been minimized.
I suppose that, for alignment reasons, the size of |
This comment has been minimized.
This comment has been minimized.
That seems to be a formatting issue, yet running rustfmt on the file doesn't raise any complaints. |
⌛ Testing commit 386ab1e with merge 824ed5019ca407ae81afe5bc7163faee796aae22... |
💔 Test failed - checks-actions |
Well, that's a doozy. |
This comment has been minimized.
This comment has been minimized.
@bors retry |
⌛ Testing commit 386ab1e with merge 9f6776cf4b2bda47d9bfa3dfc00b365b90cac7b4... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e100ec5): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Fixes #92084