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

Function is not linked in docs if is has the same name as a struct and is re-exported #37342

Closed
nwin opened this issue Oct 22, 2016 · 1 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.

Comments

@nwin
Copy link
Contributor

nwin commented Oct 22, 2016

While docs for fn Foo are generated in the following they are not linked anywhere and can’t be found by using the search. fn Bar is linked on the other hand.

mod internal {
    pub struct Foo {
        _val: ()
    }

    #[allow(non_snake_case)] 
    pub fn Foo() -> Foo {
        Foo { _val: () }
    }   
}

pub struct Bar {
    _val: ()
}

#[allow(non_snake_case)] 
pub fn Bar() -> Bar {
    Bar { _val: () }
}

pub use internal::Foo;

fn main() {
    let _ = Foo();
    let _ = Bar();
}

On the other hand, when using pub use internal::* it works like expected. This is inconsistent as the function is clearly accessible from fn main in both cases.

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

Duplicate of #34843, which was fixed in #51425.

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