Skip to content

Commit

Permalink
fix(cargo-lint): Make im-a-teapot permanently unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
Muscraft committed Apr 25, 2024
1 parent cb1123f commit 4f9c694
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/cargo/util/lints.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::core::dependency::DepKind;
use crate::core::FeatureValue::Dep;
use crate::core::{Edition, FeatureValue, Package};
use crate::core::{Edition, Feature, FeatureValue, Package};
use crate::util::interning::InternedString;
use crate::{CargoResult, GlobalContext};
use annotate_snippets::{Level, Renderer, Snippet};
Expand Down Expand Up @@ -238,6 +238,15 @@ pub fn check_im_a_teapot(
error_count: &mut usize,
gctx: &GlobalContext,
) -> CargoResult<()> {
// This lint is only available when `test-dummy-unstable` is enabled
if !pkg
.manifest()
.unstable_features()
.is_enabled(Feature::test_dummy_unstable())
{
return Ok(());
}

let manifest = pkg.manifest();
let (lint_level, reason) = IM_A_TEAPOT.level(pkg_lints, ws_lints, manifest.edition());
if lint_level == LintLevel::Allow {
Expand Down

0 comments on commit 4f9c694

Please sign in to comment.