Skip to content

avoid-breaking-exported-api config should default to false for binary crates #10689

Open
@BartMassey

Description

@BartMassey

Description

As it stands, the Clippy configuration variable avoid-breaking-exported-api defaults to true for binary crates. This probably doesn't make a lot of sense: binaries don't have an API, and it is not uncommon to have pub symbols in them for various reasons: most notably to temporarily suppress "unused" warnings during development.

I would suggest the default for binary crates should be false.

It is worth considering whether there should be a lint for exported API in binary crates. This would catch some unused code cases, as noted above. Let me know if I should file a separate issue for that.

Version

rustc 1.69.0 (84c898d65 2023-04-16)
binary: rustc
commit-hash: 84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc
commit-date: 2023-04-16
host: x86_64-unknown-linux-gnu
release: 1.69.0
LLVM version: 15.0.7

Additional Labels

No response

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