-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #13805 - Muscraft:im-a-teapot-lint-unstable, r=epage
Error when unstable lints are specified but not enabled In [#13797, it was noted that](#13797 (comment)) the `im-a-teapot` lint should always be unstable. This PR makes it so that `im-a-teapot` is unstable, and it is an error to specify it without the `test-dummy-unstable` cargo feature. It does this by adding a `feature-gate` field to `Lint` and `LintGroup` that optionally puts the lint/lint group behind a feature. The `feature-gate` is then checked during the new `analyze_cargo_lints_table` step that runs across all lints (and groups) specified in `[lints.cargo]` or `[workspace.lints]` if the package is inheriting its lints from a workspace. The error looks like the following: No inherit ![No inherit](https://github.com/rust-lang/cargo/assets/23045215/c245af87-8623-42dc-9652-be461809bb30) Inherited ![Inhrtited](https://github.com/rust-lang/cargo/assets/23045215/5a90b7c9-0e9e-4a07-ab0e-e2e43cca8991)
- Loading branch information
Showing
4 changed files
with
373 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.