diff --git a/src/cargo/util/toml/embedded.rs b/src/cargo/util/toml/embedded.rs index 482268923fc3..ca587007557d 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_VERSION: &str = "0.0.0"; const DEFAULT_PUBLISH: bool = false; const AUTO_FIELDS: &[&str] = &["autobins", "autoexamples", "autotests", "autobenches"]; @@ -123,9 +122,6 @@ fn expand_manifest_( package .entry("name".to_owned()) .or_insert(toml::Value::String(name)); - package - .entry("version".to_owned()) - .or_insert_with(|| toml::Value::String(DEFAULT_VERSION.to_owned())); package.entry("edition".to_owned()).or_insert_with(|| { let _ = config.shell().warn(format_args!( "`package.edition` is unspecified, defaulting to `{}`", @@ -622,7 +618,6 @@ build = false edition = "2021" name = "test-" publish = false -version = "0.0.0" [profile.release] strip = true @@ -652,7 +647,6 @@ build = false edition = "2021" name = "test-" publish = false -version = "0.0.0" [profile.release] strip = true diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md index b66469c8ce57..f73ffe230d5c 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -1221,7 +1221,6 @@ at the start of the infostring at the top of the file. Inferred / defaulted manifest fields: - `package.name = ` -- `package.version = "0.0.0"` to [call attention to this crate being used in unexpected places](https://matklad.github.io/2021/08/22/large-rust-workspaces.html#Smaller-Tips) - `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