-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 apparently unnecessary conditional in doc_value
#91305
Conversation
Note for the future: This PR is designed to be easily reverted. Feel free to revert it if significant regressions arise. |
rustdoc: Write doc-comments directly instead of using FromIterator The FromIterator impl made the code much harder to understand. The types don't make sense until you realize there's a custom FromIterator impl. This is the first commit from rust-lang#91305; since `@camelid` wrote it originally I don't feel bad unilaterally approving it. r? `@ghost` `@bors` r+ Note that this will conflict with rust-lang#92078.
rustdoc: Write doc-comments directly instead of using FromIterator The FromIterator impl made the code much harder to understand. The types don't make sense until you realize there's a custom FromIterator impl. This is the first commit from rust-lang#91305; since ``@camelid`` wrote it originally I don't feel bad unilaterally approving it. r? ``@ghost`` ``@bors`` r+ Note that this will conflict with rust-lang#92078.
…eGomez rustdoc: Remove unused `collapsed` field `render/context` always runs after `run_global_context`, so it was always set to `true`. This is a holdover from when rustdoc allowed configuring passes, but the `collapse-docs` pass was removed ages ago, and the ability to configure passes is about to be removed. Found while reviewing rust-lang#91305.
This comment has been minimized.
This comment has been minimized.
I need to remove this conditional for rust-lang#91072, but while it seems unnecessary, we are not certain. So, the plan is to first remove the conditional and see if any regressions pop up before doing the refactor. This way, it will be easier to revert if there are subtle regressions.
@rustbot ready |
I still am very uncomfortable making a change we know changes the behavior, but I don't want to block it. |
@@ -1067,9 +1067,6 @@ impl Attributes { | |||
let mut out = String::new(); | |||
add_doc_fragment(&mut out, ori); | |||
for new_frag in iter { | |||
if new_frag.kind != ori.kind || new_frag.parent_module != ori.parent_module { | |||
break; | |||
} |
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.
nit: this means that the iter.next()
and such seems no longer necessary here (all elements of the iterator are directly added), but if you're just leaving that for easier revert seems OK.
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.
Let's see what @camelid thinks about it.
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.
That's a good point, but I do want to make this easy to revert quickly. So I think let's leave it as-is for now.
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.
Apart from @Mark-Simulacrum's comment, looks good to me.
Hmm... GitHub didn't notify me until just now. |
@bors r=GuillaumeGomez rollup=never (for easy bisecting) |
📌 Commit 82d8ed4 has been approved by |
⌛ Testing commit 82d8ed4 with merge 6702eb6519fd3567230d593f986503fd38329651... |
💔 Test failed - checks-actions |
@bors retry |
⌛ Testing commit 82d8ed4 with merge 7d60dbbf68500d22760ab06370681c36880cd021... |
💥 Test timed out |
@bors retry x86_64-msvc-1 took more than 4.5 hours to finish |
☀️ Test successful - checks-actions |
Finished benchmarking commit (0282233): 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 |
I need to remove this conditional for #91072, but while it seems
unnecessary, we are not certain. So, the plan is to first remove the
conditional and see if any regressions pop up before doing the refactor.
This way, it will be easier to revert if there are subtle regressions.
r? @jyn514