Skip to content

Commit

Permalink
Auto merge of #13390 - stevenengler:doc-version, r=weihanglo
Browse files Browse the repository at this point in the history
doc: `[package]` doesn't require `version` field

Since #12786 (in 1.75) cargo doesn't require the version field as it defaults to 0.0.0. A bin crate with the following toml builds successfully with `cargo build`:

```toml
[package]
name = "foo"
```

This PR slightly rewords the `[package]` section of `src/doc/src/reference/manifest.md` to reflect this.
  • Loading branch information
bors committed Feb 4, 2024
2 parents cdf84b6 + 1a2e4f2 commit 8c96a1a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/doc/src/reference/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ version = "0.1.0" # the current version, obeying semver
authors = ["Alice <a@example.com>", "Bob <b@example.com>"]
```

The only fields required by Cargo are [`name`](#the-name-field) and
[`version`](#the-version-field). If publishing to a registry, the registry may
require additional fields. See the notes below and [the publishing
chapter][publishing] for requirements for publishing to [crates.io].
The only field required by Cargo is [`name`](#the-name-field). If publishing to
a registry, the registry may require additional fields. See the notes below and
[the publishing chapter][publishing] for requirements for publishing to
[crates.io].

### The `name` field

Expand Down

0 comments on commit 8c96a1a

Please sign in to comment.