-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Remove cfg(doc)
from std::os module reexports to fix rustdoc linking issues
#88619
Remove cfg(doc)
from std::os module reexports to fix rustdoc linking issues
#88619
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
I don't think this is the right approach. We should find why the link-to-definition pass is broken and fix it, not change the standard library to avoid rustdoc bugs. |
Well, it's not specific to the jump to definition feature. The link itself is correct after all... The problem is that we have a different rendering with "cfg(doc)". We literally can't fix it. |
Got it, that makes sense. This seems like a reasonable change then, to make the information available to rustdoc when documenting it as a dependency. |
I'll check what's wrong with the changes I made. |
5e090fd
to
8ab4b68
Compare
So: in the first commit I used |
cfg(doc)
from std::os module reexports to fix rustdoc linking issues
Seems like it's ready for review! :) |
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.
@GuillaumeGomez I was planning to let @joshtriplett review, I don't think we should be changing fundamental things about libstd without asking T-libs.
library/std/src/os/mod.rs
Outdated
// so these modules are enabled when `cfg(doc)` is set. | ||
// This should help show platform-specific functionality in a hopefully cross-platform | ||
// way in the documentation. |
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.
This comment is out of date.
Which is why I didn't set you as reviewer. ;) But reviews from you remain very welcome! |
0570239
to
85809ea
Compare
This comment has been minimized.
This comment has been minimized.
0c1e11a
to
ceb85de
Compare
r? @Amanieu |
ceb85de
to
88d5aa6
Compare
Updated! |
@matthiaskrgr @camsteffen: Any idea what's going on with the clippy lint by any chance? |
That lint uses the absolute path of |
Oh I see, thanks! |
b98ba6f
to
9a3b1cf
Compare
@bors: r=Amanieu |
📌 Commit 9a3b1cf has been approved by |
…ports, r=Amanieu Remove `cfg(doc)` from std::os module reexports to fix rustdoc linking issues Fixes rust-lang#88304. I tested it based on rust-lang#88292. Not sure if it's the best approach, but at least it makes thing a bit simpler. cc ``@jyn514``
…ports, r=Amanieu Remove `cfg(doc)` from std::os module reexports to fix rustdoc linking issues Fixes rust-lang#88304. I tested it based on rust-lang#88292. Not sure if it's the best approach, but at least it makes thing a bit simpler. cc ```@jyn514```
…ports, r=Amanieu Remove `cfg(doc)` from std::os module reexports to fix rustdoc linking issues Fixes rust-lang#88304. I tested it based on rust-lang#88292. Not sure if it's the best approach, but at least it makes thing a bit simpler. cc ````@jyn514````
☀️ Test successful - checks-actions |
Finished benchmarking commit (e846f9c): 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 |
Fixes #88304.
I tested it based on #88292.
Not sure if it's the best approach, but at least it makes thing a bit simpler.
cc @jyn514