diff --git a/src/cargo/util/toml/embedded.rs b/src/cargo/util/toml/embedded.rs index ca587007557d..8e3912288bf0 100644 --- a/src/cargo/util/toml/embedded.rs +++ b/src/cargo/util/toml/embedded.rs @@ -6,7 +6,6 @@ use crate::Config; const DEFAULT_EDITION: crate::core::features::Edition = crate::core::features::Edition::LATEST_STABLE; -const DEFAULT_PUBLISH: bool = false; const AUTO_FIELDS: &[&str] = &["autobins", "autoexamples", "autotests", "autobenches"]; pub fn expand_manifest( @@ -132,9 +131,6 @@ fn expand_manifest_( package .entry("build".to_owned()) .or_insert_with(|| toml::Value::Boolean(false)); - package - .entry("publish".to_owned()) - .or_insert_with(|| toml::Value::Boolean(DEFAULT_PUBLISH)); for field in AUTO_FIELDS { package .entry(field.to_owned()) @@ -617,7 +613,6 @@ autotests = false build = false edition = "2021" name = "test-" -publish = false [profile.release] strip = true @@ -646,7 +641,6 @@ autotests = false build = false edition = "2021" name = "test-" -publish = false [profile.release] strip = true diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md index fb9a89f4ae5a..b5bbeae84021 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -1230,8 +1230,6 @@ at the start of the infostring at the top of the file. Inferred / defaulted manifest fields: - `package.name = ` -- `package.publish = false` to avoid accidental publishes, particularly if we - later add support for including them in a workspace. - `package.edition = ` to avoid always having to add an embedded manifest at the cost of potentially breaking scripts on rust upgrades - Warn when `edition` is unspecified to raise awareness of this