Skip to content

Commit ba7a4ba

Browse files
joshtriplettehuss
authored andcommitted
Clarify that versions need not be textually identical, just equal once resolved
1 parent a199274 commit ba7a4ba

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

text/3176-cargo-multi-dep-artifacts.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ error.
4343
However, Cargo allows [renaming
4444
dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml),
4545
to refer to a crate by a different name than the one it was published under. If
46-
you use this feature, you may have multiple dependencies on exactly the same
47-
version of the same crate, as long as the dependencies have different names.
48-
For example:
46+
you use this feature, you may have multiple dependencies on the same version of
47+
the same crate, as long as the dependencies have different names. For example:
4948

5049
```toml
5150
[dependencies]
@@ -79,7 +78,7 @@ specified by `CARGO_BIN_DIR_EXAMPLE_ARM`.
7978
[reference-level-explanation]: #reference-level-explanation
8079

8180
Cargo allows specifying multiple dependencies on the same crate, as long as all
82-
such dependencies unify to the same version with the same features, and have
81+
such dependencies resolve to the same version with the same features, and have
8382
different dependency names specified. Cargo will make the dependency available
8483
under each specified name.
8584

@@ -99,7 +98,9 @@ Cargo will unify features and versions across all kinds of dependencies,
9998
including multiple artifact dependencies, just as it does for multiple
10099
dependencies on the same crate throughout a dependency tree. A dependency tree
101100
may only include one semver-compatible version of a given crate, but may
102-
include multiple semver-incompatible versions of a given crate.
101+
include multiple semver-incompatible versions of a given crate. Dependency
102+
versions need not be textually identical, as long as they resolve to the same
103+
version.
103104

104105
Building an artifact dependency for multiple targets may entail building
105106
multiple copies of other dependencies, which must similarly unify within a

0 commit comments

Comments
 (0)