Skip to content

Commit 4f9c694

Browse files
committed
fix(cargo-lint): Make im-a-teapot permanently unstable
1 parent cb1123f commit 4f9c694

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/cargo/util/lints.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::core::dependency::DepKind;
22
use crate::core::FeatureValue::Dep;
3-
use crate::core::{Edition, FeatureValue, Package};
3+
use crate::core::{Edition, Feature, FeatureValue, Package};
44
use crate::util::interning::InternedString;
55
use crate::{CargoResult, GlobalContext};
66
use annotate_snippets::{Level, Renderer, Snippet};
@@ -238,6 +238,15 @@ pub fn check_im_a_teapot(
238238
error_count: &mut usize,
239239
gctx: &GlobalContext,
240240
) -> CargoResult<()> {
241+
// This lint is only available when `test-dummy-unstable` is enabled
242+
if !pkg
243+
.manifest()
244+
.unstable_features()
245+
.is_enabled(Feature::test_dummy_unstable())
246+
{
247+
return Ok(());
248+
}
249+
241250
let manifest = pkg.manifest();
242251
let (lint_level, reason) = IM_A_TEAPOT.level(pkg_lints, ws_lints, manifest.edition());
243252
if lint_level == LintLevel::Allow {

0 commit comments

Comments
 (0)