From ff349f0205e52083393acfca9b61ee82dfc18b31 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 20 Jan 2021 19:31:57 -0800 Subject: [PATCH] Remove publish-lockfile key from manifest. The feature was stabilized without the key in #7026 about 1.5 years ago. (Will follow up with an error message in a subsequent commit.) --- src/cargo/core/manifest.rs | 3 --- src/cargo/util/toml/mod.rs | 15 --------------- tests/testsuite/publish_lockfile.rs | 2 -- 3 files changed, 20 deletions(-) diff --git a/src/cargo/core/manifest.rs b/src/cargo/core/manifest.rs index 4608adcbe3f..330e07f0627 100644 --- a/src/cargo/core/manifest.rs +++ b/src/cargo/core/manifest.rs @@ -39,7 +39,6 @@ pub struct Manifest { custom_metadata: Option, profiles: Option, publish: Option>, - publish_lockfile: bool, replace: Vec<(PackageIdSpec, Dependency)>, patch: HashMap>, workspace: WorkspaceConfig, @@ -374,7 +373,6 @@ impl Manifest { custom_metadata: Option, profiles: Option, publish: Option>, - publish_lockfile: bool, replace: Vec<(PackageIdSpec, Dependency)>, patch: HashMap>, workspace: WorkspaceConfig, @@ -407,7 +405,6 @@ impl Manifest { original, im_a_teapot, default_run, - publish_lockfile, metabuild, resolve_behavior, } diff --git a/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs index 404d07b3428..24f362ce75f 100644 --- a/src/cargo/util/toml/mod.rs +++ b/src/cargo/util/toml/mod.rs @@ -825,7 +825,6 @@ pub struct TomlProject { exclude: Option>, include: Option>, publish: Option, - publish_lockfile: Option, workspace: Option, im_a_teapot: Option, autobins: Option, @@ -1304,19 +1303,6 @@ impl TomlManifest { None | Some(VecStringOrBool::Bool(true)) => None, }; - let publish_lockfile = match project.publish_lockfile { - Some(b) => { - features.require(Feature::publish_lockfile())?; - warnings.push( - "The `publish-lockfile` feature is deprecated and currently \ - has no effect. It may be removed in a future version." - .to_string(), - ); - b - } - None => features.is_enabled(Feature::publish_lockfile()), - }; - if summary.features().contains_key("default-features") { warnings.push( "`default-features = [\"..\"]` was found in [features]. \ @@ -1348,7 +1334,6 @@ impl TomlManifest { custom_metadata, profiles, publish, - publish_lockfile, replace, patch, workspace_config, diff --git a/tests/testsuite/publish_lockfile.rs b/tests/testsuite/publish_lockfile.rs index a858444ceef..9355de07b1d 100644 --- a/tests/testsuite/publish_lockfile.rs +++ b/tests/testsuite/publish_lockfile.rs @@ -52,8 +52,6 @@ fn deprecated() { "\ [PACKAGING] foo v0.1.0 ([..]) [VERIFYING] foo v0.1.0 ([..]) -[WARNING] The `publish-lockfile` feature is deprecated and currently has no effect. \ - It may be removed in a future version. [COMPILING] foo v0.1.0 ([..]) [FINISHED] dev [..] ",