Skip to content
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

Rustdoc does not show Into implementations, only From implementations #39991

Closed
shepmaster opened this issue Feb 20, 2017 · 2 comments
Closed
Labels
C-bug Category: This is a bug. T-dev-tools Relevant to the dev-tools subteam, 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

@shepmaster
Copy link
Member

This code:

pub struct Hello;

impl Into<Hello> for String {
    fn into(self) -> Hello {
        Hello
    }
}

impl From<u8> for Hello {
    fn from(_: u8) -> Hello {
        Hello
    }
}

Documents the implementation of From (presumably because it's implemented for a local type), but not Into, (presumably because it's an implemented on a non-local type).

In many cases, this is "OK" because we build the whole documentation and so we can see the implementors of a trait. This doesn't work when the trait is in the standard library, which doesn't regenerate docs with cargo doc.

I'm sure this is a duplicate issue, I just haven't found it yet. This can serve as a signpost when we do!

/cc #33417, which will encourage more cases of implementing a trait we don't own parameterized with a type we do own for a type we don't own.

rustc 1.15.1 (021bd294c 2017-02-08)
binary: rustc
commit-hash: 021bd294c039bd54aa5c4aa85bcdffb0d24bc892
commit-date: 2017-02-08
host: x86_64-apple-darwin
release: 1.15.1
LLVM version: 3.9
@RReverser
Copy link
Contributor

I can't even get all my From implementations documented :(

@shepmaster shepmaster added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 23, 2017
@steveklabnik steveklabnik added the T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. label May 18, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 27, 2017
@QuietMisdreavus
Copy link
Member

Duplicate of #25264

@QuietMisdreavus QuietMisdreavus marked this as a duplicate of #25264 Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-dev-tools Relevant to the dev-tools subteam, 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

5 participants