diff --git a/src/doc/src/reference/workspaces.md b/src/doc/src/reference/workspaces.md index 5104a18a3d8..36a2e73238e 100644 --- a/src/doc/src/reference/workspaces.md +++ b/src/doc/src/reference/workspaces.md @@ -67,6 +67,7 @@ you want to keep all the packages organized in separate directories. # [PROJECT_DIR]/Cargo.toml [workspace] members = ["hello_world"] +resolver = "2" ``` ```toml @@ -74,9 +75,15 @@ members = ["hello_world"] [package] name = "hello_world" # the name of the package version = "0.1.0" # the current version, obeying semver +edition = "2021" # the edition, will have no effect on a resolver used in the workspace authors = ["Alice ", "Bob "] ``` +Note that in a virtual manifest the [`resolver = "2"`](resolver.md#resolver-versions) +should be specified manually. It is usually deduced from the [`package.edition`][package-edition] +field which is absent in virtual manifests and the edition field of a member +won't affect the resolver used by the workspace. + ### The `members` and `exclude` fields The `members` and `exclude` fields define which packages are members of @@ -241,6 +248,7 @@ if that makes sense for the tool in question. [package]: manifest.md#the-package-section [`Cargo.lock`]: ../guide/cargo-toml-vs-cargo-lock.md [package-metadata]: manifest.md#the-metadata-table +[package-edition]: manifest.md#the-edition-field [output directory]: ../guide/build-cache.md [patch]: overriding-dependencies.md#the-patch-section [replace]: overriding-dependencies.md#the-replace-section