Skip to content

Warn when private structs have public fields #17697

Closed
@mahkoh

Description

@mahkoh
#![crate_type = "lib"]

struct X {
    pub i: int,
}

pub fn f() {
    X { i: 1 };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions