-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Get rid of doc(primitive) #98248
Comments
I think this would simplify things a lot. I didn't think it's a great idea and I'm all for it! |
Just one thing I wonder: will this documentation remain available in |
Yes, they're already there: https://doc.rust-lang.org/stable/core/primitive/index.html |
Perfect! Then there is really nothing preventing us from doing it. |
How would you handle primitives that aren't re-exported from |
Oh, that's a good point :( maybe this wouldn't work |
going to close this, don't have ideas on how to make non-path primitives work :( |
I was chatting with @compiler-errors on twitter about #87073. In retrospect I think the whole thing was overcomplicated and we can get the equivalent behavior much more simply by treating documentation on the re-exports in core::primitive as docs for the primitive items themselves, just like for normal re-exports.
This does mean we have to do something like
in std::primitive rather than just
use core::primitive::*;
. But that seems pretty simple compared to all the current special casing.The last thing to deal with here is overwriting the docs instead of appending - I think that would need a new nightly rustdoc feature, but it would be pretty simple to implement, basically just an
if
condition intry_inline
for this line:rust/src/librustdoc/clean/inline.rs
Line 304 in 3b98c08
So, an overview of all that:
mod bool
hackery in std and rustdoc; add docs to the re-exports incore::primitive
.@rust-lang/rustdoc I don't plan to work on this, but does it make sense / sound like a good idea?
The text was updated successfully, but these errors were encountered: