From 571cd943a4c7d784fe803bc844c748ce4ba96d4c Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 6 Oct 2023 13:54:13 -0500 Subject: [PATCH] fix(embedded): Rely on package.publish default for scripts --- src/cargo/util/toml/embedded.rs | 6 ------ src/doc/src/reference/unstable.md | 2 -- 2 files changed, 8 deletions(-) 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 f73ffe230d5c..12a56d72298c 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -1221,8 +1221,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