From 0e3503ee75b646aaf5aa9ec9bcfea2cd781592d2 Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Sat, 23 Mar 2024 11:22:29 -0600 Subject: [PATCH] fix: Warn on -Zlints --- src/cargo/core/features.rs | 5 ++- tests/testsuite/cargo/z_help/stdout.term.svg | 44 ++++++++++---------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/src/cargo/core/features.rs b/src/cargo/core/features.rs index 24e208fc9133..13046b2b28f6 100644 --- a/src/cargo/core/features.rs +++ b/src/cargo/core/features.rs @@ -761,7 +761,6 @@ unstable_cli_options!( git: Option = ("Enable support for shallow git fetch operations"), gitoxide: Option = ("Use gitoxide for the given git interactions, or all of them if no argument is given"), host_config: bool = ("Enable the `[host]` section in the .cargo/config.toml file"), - lints: bool = ("Pass `[lints]` to the linting tools"), minimal_versions: bool = ("Resolve minimal dependency versions instead of maximum"), msrv_policy: bool = ("Enable rust-version aware policy within cargo"), mtime_on_use: bool = ("Configure Cargo to update the mtime of used files"), @@ -852,6 +851,8 @@ const STABILIZED_CREDENTIAL_PROCESS: &str = const STABILIZED_REGISTRY_AUTH: &str = "Authenticated registries are available if a credential provider is configured."; +const STABILIZED_LINTS: &str = "The `[lints]` table is now always available."; + fn deserialize_build_std<'de, D>(deserializer: D) -> Result>, D::Error> where D: serde::Deserializer<'de>, @@ -1104,6 +1105,7 @@ impl CliUnstable { "terminal-width" => stabilized_warn(k, "1.68", STABILIZED_TERMINAL_WIDTH), "doctest-in-workspace" => stabilized_warn(k, "1.72", STABILIZED_DOCTEST_IN_WORKSPACE), "credential-process" => stabilized_warn(k, "1.74", STABILIZED_CREDENTIAL_PROCESS), + "lints" => stabilized_warn(k, "1.74", STABILIZED_LINTS), "registry-auth" => stabilized_warn(k, "1.74", STABILIZED_REGISTRY_AUTH), // Unstable features @@ -1139,7 +1141,6 @@ impl CliUnstable { )? } "host-config" => self.host_config = parse_empty(k, v)?, - "lints" => self.lints = parse_empty(k, v)?, "next-lockfile-bump" => self.next_lockfile_bump = parse_empty(k, v)?, "minimal-versions" => self.minimal_versions = parse_empty(k, v)?, "msrv-policy" => self.msrv_policy = parse_empty(k, v)?, diff --git a/tests/testsuite/cargo/z_help/stdout.term.svg b/tests/testsuite/cargo/z_help/stdout.term.svg index 5848c09f543e..bede1099f885 100644 --- a/tests/testsuite/cargo/z_help/stdout.term.svg +++ b/tests/testsuite/cargo/z_help/stdout.term.svg @@ -1,4 +1,4 @@ - +