Skip to content

Commit 77506e5

Browse files
committedMar 23, 2024·
Auto merge of #13632 - Muscraft:fix-lints-z-flag, r=ehuss
fix: Warn on -Zlints When the `[lints]` table was stabilized in #12648, it appears that making `-Zlints` into a warning when specified was missed, this PR fixes that.
2 parents 61855e7 + c006a30 commit 77506e5

File tree

2 files changed

+24
-25
lines changed

2 files changed

+24
-25
lines changed
 

Diff for: ‎src/cargo/core/features.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,6 @@ unstable_cli_options!(
762762
git: Option<GitFeatures> = ("Enable support for shallow git fetch operations"),
763763
gitoxide: Option<GitoxideFeatures> = ("Use gitoxide for the given git interactions, or all of them if no argument is given"),
764764
host_config: bool = ("Enable the `[host]` section in the .cargo/config.toml file"),
765-
lints: bool = ("Pass `[lints]` to the linting tools"),
766765
minimal_versions: bool = ("Resolve minimal dependency versions instead of maximum"),
767766
msrv_policy: bool = ("Enable rust-version aware policy within cargo"),
768767
mtime_on_use: bool = ("Configure Cargo to update the mtime of used files"),
@@ -853,6 +852,8 @@ const STABILIZED_CREDENTIAL_PROCESS: &str =
853852
const STABILIZED_REGISTRY_AUTH: &str =
854853
"Authenticated registries are available if a credential provider is configured.";
855854

855+
const STABILIZED_LINTS: &str = "The `[lints]` table is now always available.";
856+
856857
fn deserialize_build_std<'de, D>(deserializer: D) -> Result<Option<Vec<String>>, D::Error>
857858
where
858859
D: serde::Deserializer<'de>,
@@ -1105,6 +1106,7 @@ impl CliUnstable {
11051106
"terminal-width" => stabilized_warn(k, "1.68", STABILIZED_TERMINAL_WIDTH),
11061107
"doctest-in-workspace" => stabilized_warn(k, "1.72", STABILIZED_DOCTEST_IN_WORKSPACE),
11071108
"credential-process" => stabilized_warn(k, "1.74", STABILIZED_CREDENTIAL_PROCESS),
1109+
"lints" => stabilized_warn(k, "1.74", STABILIZED_LINTS),
11081110
"registry-auth" => stabilized_warn(k, "1.74", STABILIZED_REGISTRY_AUTH),
11091111

11101112
// Unstable features
@@ -1141,7 +1143,6 @@ impl CliUnstable {
11411143
)?
11421144
}
11431145
"host-config" => self.host_config = parse_empty(k, v)?,
1144-
"lints" => self.lints = parse_empty(k, v)?,
11451146
"next-lockfile-bump" => self.next_lockfile_bump = parse_empty(k, v)?,
11461147
"minimal-versions" => self.minimal_versions = parse_empty(k, v)?,
11471148
"msrv-policy" => self.msrv_policy = parse_empty(k, v)?,

Diff for: ‎tests/testsuite/cargo/z_help/stdout.term.svg

+21-23
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.