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

fix(doctest): detect extern crate items in statement doctests #91149

Merged
merged 2 commits into from
Nov 24, 2021

Conversation

notriddle
Copy link
Contributor

This partially reverts #91026, because rustdoc needs to detect the extern statements, even when they appear inside implicit main(). It does not entirely revert it, so the old bug is still fixed, by duplicating some of the logic from parse_mod instead of trying to use it directly.

Fixes #91134

This partially reverts rust-lang#91026, because rustdoc needs to detect the extern statements,
even when they appear inside implicit `main()`. It does not entirely revert it,
so the old bug is still fixed, by duplicating some of the logic from `parse_mod`
instead of trying to use it directly.

Fixes rust-lang#91134
@rust-highfive
Copy link
Collaborator

r? @ollie27

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 23, 2021
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this code more closely, it seems extremely fragile ... but that shouldn't block this immediate fix, which seems ok.

@jyn514
Copy link
Member

jyn514 commented Nov 23, 2021

@bors r+ p=1 (needs to land before Friday beta cutoff)

@bors
Copy link
Contributor

bors commented Nov 23, 2021

📌 Commit 1e21dfa has been approved by jyn514

@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 Nov 23, 2021
@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-doctests Area: Documentation tests, run by rustdoc labels Nov 23, 2021
@bors
Copy link
Contributor

bors commented Nov 23, 2021

⌛ Testing commit 1e21dfa with merge de4b242...

@bors
Copy link
Contributor

bors commented Nov 24, 2021

☀️ Test successful - checks-actions
Approved by: jyn514
Pushing de4b242 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 24, 2021
@bors bors merged commit de4b242 into rust-lang:master Nov 24, 2021
@rustbot rustbot added this to the 1.58.0 milestone Nov 24, 2021
@notriddle notriddle deleted the notriddle/rustdoc-doctest-semicolon branch November 24, 2021 03:47
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (de4b242): comparison url.

Summary: This change led to very large relevant regressions 😿 in compiler performance.

  • Very large regression in instruction counts (up to 6.2% on incr-unchanged builds of inflate)

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-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression

@rustbot rustbot added the perf-regression Performance regression. label Nov 24, 2021
@Mark-Simulacrum Mark-Simulacrum removed the perf-regression Performance regression. label Nov 30, 2021
@Mark-Simulacrum
Copy link
Member

I cannot reproduce this regression locally, so it seems likely to be unfortunately spurious. Not clear what the cause might be (maybe incr-hashes dependent on some kind of environmental randomness?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-doctests Area: Documentation tests, run by rustdoc 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.

Duplicate extern crate in doc tests (2021-11-21 Nightly Regression)
9 participants