Skip to content

Commit

Permalink
Remove publish-lockfile key from manifest.
Browse files Browse the repository at this point in the history
The feature was stabilized without the key in rust-lang#7026 about 1.5 years ago.
(Will follow up with an error message in a subsequent commit.)
  • Loading branch information
ehuss committed Jan 21, 2021
1 parent d89a78e commit ff349f0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
3 changes: 0 additions & 3 deletions src/cargo/core/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ pub struct Manifest {
custom_metadata: Option<toml::Value>,
profiles: Option<TomlProfiles>,
publish: Option<Vec<String>>,
publish_lockfile: bool,
replace: Vec<(PackageIdSpec, Dependency)>,
patch: HashMap<Url, Vec<Dependency>>,
workspace: WorkspaceConfig,
Expand Down Expand Up @@ -374,7 +373,6 @@ impl Manifest {
custom_metadata: Option<toml::Value>,
profiles: Option<TomlProfiles>,
publish: Option<Vec<String>>,
publish_lockfile: bool,
replace: Vec<(PackageIdSpec, Dependency)>,
patch: HashMap<Url, Vec<Dependency>>,
workspace: WorkspaceConfig,
Expand Down Expand Up @@ -407,7 +405,6 @@ impl Manifest {
original,
im_a_teapot,
default_run,
publish_lockfile,
metabuild,
resolve_behavior,
}
Expand Down
15 changes: 0 additions & 15 deletions src/cargo/util/toml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,6 @@ pub struct TomlProject {
exclude: Option<Vec<String>>,
include: Option<Vec<String>>,
publish: Option<VecStringOrBool>,
publish_lockfile: Option<bool>,
workspace: Option<String>,
im_a_teapot: Option<bool>,
autobins: Option<bool>,
Expand Down Expand Up @@ -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]. \
Expand Down Expand Up @@ -1348,7 +1334,6 @@ impl TomlManifest {
custom_metadata,
profiles,
publish,
publish_lockfile,
replace,
patch,
workspace_config,
Expand Down
2 changes: 0 additions & 2 deletions tests/testsuite/publish_lockfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 [..]
",
Expand Down

0 comments on commit ff349f0

Please sign in to comment.