Skip to content
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

Merged
merged 1 commit into from
Jan 8, 2022

Conversation

camelid
Copy link
Member

@camelid camelid commented Nov 28, 2021

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

@camelid camelid 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-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 28, 2021
@camelid
Copy link
Member Author

camelid commented Nov 28, 2021

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.

@camelid camelid 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
Member Author

camelid commented Dec 22, 2021

@rustbot ready

@rustbot rustbot 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
Member

jyn514 commented Jan 4, 2022

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

r? @GuillaumeGomez

@@ -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;
}
Copy link
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
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.

Copy link
Member Author

@camelid camelid Jan 6, 2022

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.

Copy link
Member

@GuillaumeGomez GuillaumeGomez left a 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.

@camelid
Copy link
Member Author

camelid commented Jan 6, 2022

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

@camelid
Copy link
Member Author

camelid commented Jan 6, 2022

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

@bors
Copy link
Contributor

bors commented Jan 6, 2022

📌 Commit 82d8ed4 has been approved by GuillaumeGomez

@bors bors 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
Copy link
Contributor

bors commented Jan 7, 2022

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

@bors
Copy link
Contributor

bors commented Jan 7, 2022

💔 Test failed - checks-actions

@bors bors 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
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
Member

@bors retry

@bors bors 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
Copy link
Contributor

bors commented Jan 7, 2022

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

@bors
Copy link
Contributor

bors commented Jan 7, 2022

💥 Test timed out

@bors bors 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
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
Copy link
Contributor

ehuss commented Jan 7, 2022

@bors retry

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

@bors bors 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
Copy link
Contributor

bors commented Jan 8, 2022

⌛ Testing commit 82d8ed4 with merge 0282233...

@bors
Copy link
Contributor

bors commented Jan 8, 2022

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 8, 2022
@bors bors merged commit 0282233 into rust-lang:master Jan 8, 2022
@rustbot rustbot added this to the 1.59.0 milestone Jan 8, 2022
@rust-timer
Copy link
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant 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