Skip to content

rustdoc: Remove apparently unnecessary conditional in doc_value - #91305

Merged
bors merged 1 commit into
rust-lang:masterfrom
camelid:rm-cond
Jan 8, 2022
Merged

rustdoc: Remove apparently unnecessary conditional in doc_value#91305
bors merged 1 commit into
rust-lang:masterfrom
camelid:rm-cond

Conversation

@camelid

Copy link
Copy Markdown
Member

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

@camelidcamelid added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 28, 2021
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 28, 2021
@camelid

camelid commented Nov 28, 2021

Copy link
Copy Markdown
MemberAuthor

Note for the future: This PR is designed to be easily reverted. Feel free to revert it if significant regressions arise.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 18, 2021
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.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 18, 2021
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.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 19, 2021
…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.
@bors

This comment has been minimized.

@camelidcamelid added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 22, 2021
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.
@camelid

Copy link
Copy Markdown
MemberAuthor

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 22, 2021
@jyn514

Copy link
Copy Markdown
Member

I still am very uncomfortable making a change we know changes the behavior, but I don't want to block it.

r? @GuillaumeGomez

for new_frag in iter {
if new_frag.kind != ori.kind || new_frag.parent_module != ori.parent_module {
break;
}

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member

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.

@camelidcamelidJan 6, 2022

Copy link
Copy Markdown
MemberAuthor

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.

@GuillaumeGomezGuillaumeGomez left a comment

Copy link
Copy Markdown
Member

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.

@camelid

Copy link
Copy Markdown
MemberAuthor

Hmm... GitHub didn't notify me until just now.

@camelid

Copy link
Copy Markdown
MemberAuthor

@bors r=GuillaumeGomez rollup=never (for easy bisecting)

@bors

bors commented Jan 6, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 82d8ed4 has been approved by GuillaumeGomez

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 6, 2022
@bors

bors commented Jan 7, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 82d8ed4 with merge 6702eb6519fd3567230d593f986503fd38329651...

@bors

bors commented Jan 7, 2022

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@borsbors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 7, 2022
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web)(plain)

Click to see the possible cause of the failure (guessed by this bot)

@GuillaumeGomez

Copy link
Copy Markdown
Member

@bors retry

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 7, 2022
@bors

bors commented Jan 7, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 82d8ed4 with merge 7d60dbbf68500d22760ab06370681c36880cd021...

@bors

bors commented Jan 7, 2022

Copy link
Copy Markdown
Collaborator

💥 Test timed out

@borsbors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 7, 2022
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web)(plain)

Click to see the possible cause of the failure (guessed by this bot)

@ehuss

ehuss commented Jan 7, 2022

Copy link
Copy Markdown
Contributor

@bors retry

x86_64-msvc-1 took more than 4.5 hours to finish

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 7, 2022
@bors

bors commented Jan 8, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 82d8ed4 with merge 0282233...

@bors

bors commented Jan 8, 2022

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 0282233 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Jan 8, 2022
@bors
bors merged commit 0282233 into rust-lang:masterJan 8, 2022
@rustbotrustbot added this to the 1.59.0 milestone Jan 8, 2022
@rust-timer

Copy link
Copy Markdown
Collaborator

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

@camelid
camelid deleted the rm-cond branch January 8, 2022 19:37
Kobzol pushed a commit to Kobzol/portable-simd that referenced this pull request Feb 3, 2026
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/rust#91305.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-cleanupCategory: PRs that clean code up or issues documenting cleanup.merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@camelid@bors@jyn514@rust-log-analyzer@GuillaumeGomez@ehuss@rust-timer@Mark-Simulacrum@rust-highfive@rustbot