Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
BartMassey opened this issue Apr 21, 2023 · 0 comments

Comments

@BartMassey
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant