-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
fix(doctest): detect extern crate items in statement doctests #91149
Conversation
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
r? @ollie27 (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
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.
Looking at this code more closely, it seems extremely fragile ... but that shouldn't block this immediate fix, which seems ok.
@bors r+ p=1 (needs to land before Friday beta cutoff) |
📌 Commit 1e21dfa has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (de4b242): comparison url. Summary: This change led to very large relevant regressions 😿 in compiler performance.
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 |
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?). |
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 fromparse_mod
instead of trying to use it directly.Fixes #91134