cargo icon indicating copy to clipboard operation
cargo copied to clipboard

Error when unstable lints are specified but not enabled

Open Muscraft opened this issue 2 months ago • 4 comments

In #13797, it was noted that 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 Inherited Inhrtited

Muscraft avatar Apr 25 '24 20:04 Muscraft

r? @epage

rustbot has assigned @epage. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

rustbot avatar Apr 25 '24 20:04 rustbot

:umbrella: The latest upstream changes (presumably #13812) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Apr 27 '24 01:04 bors

:umbrella: The latest upstream changes (presumably #13829) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Apr 29 '24 18:04 bors

:umbrella: The latest upstream changes (presumably #13831) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Apr 30 '24 04:04 bors

@bors r+

epage avatar May 01 '24 13:05 epage

:pushpin: Commit 712946c518938520784a349f2b69839aaa214714 has been approved by epage

It is now in the queue for this repository.

bors avatar May 01 '24 13:05 bors

:hourglass: Testing commit 712946c518938520784a349f2b69839aaa214714 with merge 6fc9e4b9a1240860458bb678838c8ebd606d9527...

bors avatar May 01 '24 13:05 bors

:sunny: Test successful - checks-actions Approved by: epage Pushing 6fc9e4b9a1240860458bb678838c8ebd606d9527 to master...

bors avatar May 01 '24 14:05 bors