Skip to content

Rustdoc: No link to source for trait provided methods #79142

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

Closed
aDotInTheVoid opened this issue Nov 17, 2020 · 1 comment
Closed

Rustdoc: No link to source for trait provided methods #79142

aDotInTheVoid opened this issue Nov 17, 2020 · 1 comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@aDotInTheVoid
Copy link
Member

I tried this code:

pub trait Numbers {
    fn get_a_number(&self) -> i32;

    fn get_larger_number(&self) -> i32 {
        self.get_a_number() + 1
    }
}

pub struct NumberFive;

impl Numbers for NumberFive {
    fn get_a_number(&self) -> i32 {
        5
    }
}

I expected to see this happen: Provided method Numbers::get_larger_number has link to source

Instead, it doesnt.

image

Interestingly on the docs for impl Numbers for NumberFive include the link, even though the impl is in the trait definition, not the block implementing the trait for Numbers.
image

image

Meta

rustc --version --verbose:


rustc --version --verbose
rustc 1.50.0-nightly (f5230fbf7 2020-11-16)
binary: rustc
commit-hash: f5230fbf76bafd86ee4376a0e26e551df8d17fec
commit-date: 2020-11-16
host: x86_64-apple-darwin
release: 1.50.0-nightly
@aDotInTheVoid aDotInTheVoid added the C-bug Category: This is a bug. label Nov 17, 2020
@jonas-schievink jonas-schievink added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Nov 17, 2020
@jyn514
Copy link
Member

jyn514 commented Nov 17, 2020

Duplicate of #45150

@jyn514 jyn514 marked this as a duplicate of #45150 Nov 17, 2020
@jyn514 jyn514 closed this as completed Nov 17, 2020
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-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