Skip to content

Rustdoc doesn't document impls within functions #73192

Closed
@Manishearth

Description

@Manishearth

You probably shouldn't be doing this, but given that you can, we should try and support it

pub struct Foo;

pub fn foo() {
    impl Foo {
        pub fn bar(&self) {
        }
    }
}

bar() is not documented, despite being usable globally. This might have to do with --everybody-loops?.

This works fine for trait implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions