Skip to content

Reservation impls in rustdoc #87826

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

Open
steffahn opened this issue Aug 6, 2021 · 1 comment
Open

Reservation impls in rustdoc #87826

steffahn opened this issue Aug 6, 2021 · 1 comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. F-rustc_attrs Internal rustc attributes gated on the `#[rustc_attrs]` feature gate. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@steffahn
Copy link
Member

steffahn commented Aug 6, 2021

I’ve been browsing rustdoc and just noticed a very confusing blanket impl on Infallible.

Screenshot_20210806_191027

Confusing because it’s obviously in conflict with the explicit From<!> for Infallible as well as the generic From<T> for T implementation. Only after looking at the source code I could find out that this isn’t even an implementation at all. Searching for existing issues, the original issue on this topic is closed and concluded

This is how it currently looks, and I think it's "good enough". Going to close the issue.

image


This comment however is only visible on the page of the From trait itself.

Another example of this problem, the same impl on the Option<T> type.

I’m also confused by the fact that the impl is only shown on some types in std but not all. E.g. on the cmp::Ordering type you can’t see it at all.

I don’t feel like it would be a difficult change to just make this From impl entirely invisible in rustdoc. I don’t see any value in displaying it, and it can be very confusing, especially when displayed without the accompanying comment.

@rustbot label T-rustdoc, F-rustc_attrs, T-libs-api, A-docs, C-bug

Tagging T-libs-api, A-docs as well because the situation could immediately and easily be somewhat improved by adding the “this impl does not yet exist” explanation docs to the from method, as that one’s at least being displayed everywhere (if you click the [+] button sufficiently often).

@rustbot rustbot added A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. F-rustc_attrs Internal rustc attributes gated on the `#[rustc_attrs]` feature gate. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 6, 2021
@lolbinarycat
Copy link
Contributor

Triage: no change. it's worth noting this is the only usage of rustc_reservation_impl that I can find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. F-rustc_attrs Internal rustc attributes gated on the `#[rustc_attrs]` feature gate. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants