Skip to content

Commit cc9be44

Browse files
committed
fix(embedded): Rely on new defaulted version field
1 parent 1923b5b commit cc9be44

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

src/cargo/util/toml/embedded.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use crate::Config;
66

77
const DEFAULT_EDITION: crate::core::features::Edition =
88
crate::core::features::Edition::LATEST_STABLE;
9-
const DEFAULT_VERSION: &str = "0.0.0";
109
const DEFAULT_PUBLISH: bool = false;
1110
const AUTO_FIELDS: &[&str] = &["autobins", "autoexamples", "autotests", "autobenches"];
1211

@@ -123,9 +122,6 @@ fn expand_manifest_(
123122
package
124123
.entry("name".to_owned())
125124
.or_insert(toml::Value::String(name));
126-
package
127-
.entry("version".to_owned())
128-
.or_insert_with(|| toml::Value::String(DEFAULT_VERSION.to_owned()));
129125
package.entry("edition".to_owned()).or_insert_with(|| {
130126
let _ = config.shell().warn(format_args!(
131127
"`package.edition` is unspecified, defaulting to `{}`",
@@ -622,7 +618,6 @@ build = false
622618
edition = "2021"
623619
name = "test-"
624620
publish = false
625-
version = "0.0.0"
626621
627622
[profile.release]
628623
strip = true
@@ -652,7 +647,6 @@ build = false
652647
edition = "2021"
653648
name = "test-"
654649
publish = false
655-
version = "0.0.0"
656650
657651
[profile.release]
658652
strip = true

src/doc/src/reference/unstable.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,6 @@ at the start of the infostring at the top of the file.
12211221

12221222
Inferred / defaulted manifest fields:
12231223
- `package.name = <slugified file stem>`
1224-
- `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)
12251224
- `package.publish = false` to avoid accidental publishes, particularly if we
12261225
later add support for including them in a workspace.
12271226
- `package.edition = <current>` to avoid always having to add an embedded

0 commit comments

Comments
 (0)