@@ -9,12 +9,12 @@ is a string which is used to uniquely refer to one package within a graph of
99packages.
1010
1111The specification may be fully qualified, such as
12- ` https://github.com/rust-lang/crates.io-index#regex: 1.4.3 ` or it may be
12+ ` https://github.com/rust-lang/crates.io-index#regex@ 1.4.3 ` or it may be
1313abbreviated, such as ` regex ` . The abbreviated form may be used as long as it
1414uniquely identifies a single package in the dependency graph. If there is
1515ambiguity, additional qualifiers can be added to make it unique. For example,
1616if there are two versions of the ` regex ` package in the graph, then it can be
17- qualified with a version to make it unique, such as ` regex: 1.4.3 ` .
17+ qualified with a version to make it unique, such as ` regex@ 1.4.3 ` .
1818
1919#### Specification grammar
2020
@@ -23,7 +23,7 @@ The formal grammar for a Package Id Specification is:
2323``` notrust
2424spec := pkgname
2525 | proto "://" hostname-and-path [ "#" ( pkgname | semver ) ]
26- pkgname := name [ ":" semver ]
26+ pkgname := name [ ("@" | ":" ) semver ]
2727
2828proto := "http" | "git" | ...
2929```
@@ -40,17 +40,17 @@ The following are references to the `regex` package on `crates.io`:
4040| Spec | Name | Version |
4141| :------------------------------------------------------------| :-------:| :-------:|
4242| ` regex ` | ` regex ` | ` * ` |
43- | ` regex: 1.4.3 ` | ` regex ` | ` 1.4.3 ` |
43+ | ` regex@ 1.4.3 ` | ` regex ` | ` 1.4.3 ` |
4444| ` https://github.com/rust-lang/crates.io-index#regex ` | ` regex ` | ` * ` |
45- | ` https://github.com/rust-lang/crates.io-index#regex: 1.4.3 ` | ` regex ` | ` 1.4.3 ` |
45+ | ` https://github.com/rust-lang/crates.io-index#regex@ 1.4.3 ` | ` regex ` | ` 1.4.3 ` |
4646
4747The following are some examples of specs for several different git dependencies:
4848
4949| Spec | Name | Version |
5050| :----------------------------------------------------------| :----------------:| :--------:|
5151| ` https://github.com/rust-lang/cargo#0.52.0 ` | ` cargo ` | ` 0.52.0 ` |
52- | ` https://github.com/rust-lang/cargo#cargo-platform: 0.1.2 ` | <nobr >` cargo-platform ` </nobr > | ` 0.1.2 ` |
53- | ` ssh://[email protected] /rust-lang/regex.git#regex: 1.4.3 ` | ` regex ` | ` 1.4.3 ` | 52+ | ` https://github.com/rust-lang/cargo#cargo-platform@ 0.1.2 ` | <nobr >` cargo-platform ` </nobr > | ` 0.1.2 ` |
53+ | ` ssh://[email protected] /rust-lang/regex.git#regex@ 1.4.3 ` | ` regex ` | ` 1.4.3 ` | 5454
5555Local packages on the filesystem can use ` file:// ` URLs to reference them:
5656
0 commit comments