Skip to content

Commit fbb23ff

Browse files
committed
feat(cargo-lints): Add feature gates to lint groups
1 parent ce71f25 commit fbb23ff

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cargo/util/lints.rs

+2
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,15 @@ pub struct LintGroup {
220220
pub default_level: LintLevel,
221221
pub desc: &'static str,
222222
pub edition_lint_opts: Option<(Edition, LintLevel)>,
223+
pub feature_gate: Option<&'static Feature>,
223224
}
224225

225226
const TEST_DUMMY_UNSTABLE: LintGroup = LintGroup {
226227
name: "test_dummy_unstable",
227228
desc: "test_dummy_unstable is meant to only be used in tests",
228229
default_level: LintLevel::Allow,
229230
edition_lint_opts: None,
231+
feature_gate: Some(Feature::test_dummy_unstable()),
230232
};
231233

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

0 commit comments

Comments
 (0)