Skip to content

pub should not be allowed on nested items #35158

Closed
@matklad

Description

@matklad

The following compiles without errors:

fn main() {
    pub struct S;
    let _ = S;
}

It probably should be an error to specify pub on a nested item, because it has no effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions