Skip to content

Commit 889f5ab

Browse files
committed
feat(cargo-lints): Add feature gates to lint groups
1 parent 9c79776 commit 889f5ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cargo/util/lints.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,15 @@ pub struct LintGroup {
199199
pub default_level: LintLevel,
200200
pub desc: &'static str,
201201
pub edition_lint_opts: Option<(Edition, LintLevel)>,
202+
pub feature_gate: Option<&'static Feature>,
202203
}
203204

204205
const TEST_DUMMY_UNSTABLE: LintGroup = LintGroup {
205206
name: "test_dummy_unstable",
206207
desc: "test_dummy_unstable is meant to only be used in tests",
207208
default_level: LintLevel::Allow,
208209
edition_lint_opts: None,
210+
feature_gate: Some(Feature::test_dummy_unstable()),
209211
};
210212

211213
#[derive(Copy, Clone, Debug)]

0 commit comments

Comments
 (0)