@@ -389,11 +389,11 @@ The use of `path` and `version` keys together is explained in the [Multiple loca
389389
390390## Multiple locations
391391
392- It is possible to specify both a ` git ` or ` path ` location and either a
393- registry version or an alternative registry . The ` git ` or ` path ` dependency
394- will be used locally , and when published to a registry it will use the
395- registry version. If a ` version ` is specified , it is checked against the
396- local copy. Other combinations are not allowed. Examples:
392+ It is possible to specify both a registry version and a ` git ` or ` path `
393+ location . The ` git ` or ` path ` dependency will be used locally (in which case
394+ the ` version ` is checked against the local copy) , and when published to a
395+ registry like [ crates.io ] , it will use the registry version. Other
396+ combinations are not allowed. Examples:
397397
398398``` toml
399399[dependencies ]
@@ -405,11 +405,6 @@ bitflags = { path = "my-bitflags", version = "1.0" }
405405# version 1.0 from crates.io when published.
406406smallvec = { git = " https://github.com/servo/rust-smallvec.git" , version = " 1.0" }
407407
408- # Uses the given git repo when used locally, and uses
409- # version 1.0 from `my-registry` when published.
410- # See [the alternate registry chapter](registries.md#using-an-alternate-registry) for how to use an alternate registry.
411- smallvec = { git = " https://github.com/servo/rust-smallvec.git" , version = " 1.0" , registry = " my-registry" }
412-
413408# Note: if a version doesn't match, Cargo will fail to compile!
414409```
415410
0 commit comments