Skip to content

The visibility of field should be more permissive than its containing type #15875

@yezhizhen

Description

@yezhizhen

What it does

Discovered in servo/servo#39825

Advantage

Limit the unnecessarily public visibility.

Drawbacks

No response

Example

struct WebDriverPrefValue(pub PrefValue);

struct Foo(pub(crate) Bar)

Could be written as:

struct WebDriverPrefValue(PrefValue);

struct Foo(Bar)

Comparison with existing lints

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions