-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
primitive docs should show core/alloc/std accessibility #62909
Comments
I'm going to move this to T-doc as I personally don't think we should special case things even more in rustdoc (and it seems much simpler to just add a line to the primitive docs in the relevant files today). |
Ah, I missed that this is about methods, not types. In that case yeah this probably needs to be in rustdoc (and I guess only applies to primitives since those bypass coherence). |
rust/src/librustdoc/clean/types.rs Lines 1313 to 1355 in 6cc268e
|
Rustdoc could do this by checking |
In #61851, I tried to generate primitive docs in
core
, similar to those instd
. My main motivation was to clearly see whatf64
methods are available incore
alone, under#[no_std]
, since a lot of them requirestd
andlibm
support. However, I had trouble making that work because of broken documentation links betweencore
andstd
-specific methods.So I think instead,
rustdoc
could put some kind of marker on primitive methods to indicate what crate added them, so the accessibility is known. Apart from floating point, there are also a few slice methods that are only added inalloc
. Maybe there are more that I don't know yet!The text was updated successfully, but these errors were encountered: