Skip to content

Commit 2130016

Browse files
committed
Auto merge of #7573 - mgeisler:patch-1, r=alexcrichton
Use multiple requirement syntax consistently It was never super clear to me how I would specify multiple requirements since the page uses a "meta syntax" in most of the examples and only mention the real syntax in a single sentence. Now all version requirements on the page follow the same syntax.
2 parents 0c0f9ae + 37ec674 commit 2130016

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/doc/src/reference/specifying-dependencies.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ Here are some more examples of caret requirements and the versions that would
4040
be allowed with them:
4141

4242
```notrust
43-
^1.2.3 := >=1.2.3 <2.0.0
44-
^1.2 := >=1.2.0 <2.0.0
45-
^1 := >=1.0.0 <2.0.0
46-
^0.2.3 := >=0.2.3 <0.3.0
47-
^0.2 := >=0.2.0 <0.3.0
48-
^0.0.3 := >=0.0.3 <0.0.4
49-
^0.0 := >=0.0.0 <0.1.0
50-
^0 := >=0.0.0 <1.0.0
43+
^1.2.3 := >=1.2.3, <2.0.0
44+
^1.2 := >=1.2.0, <2.0.0
45+
^1 := >=1.0.0, <2.0.0
46+
^0.2.3 := >=0.2.3, <0.3.0
47+
^0.2 := >=0.2.0, <0.3.0
48+
^0.0.3 := >=0.0.3, <0.0.4
49+
^0.0 := >=0.0.0, <0.1.0
50+
^0 := >=0.0.0, <1.0.0
5151
```
5252

5353
This compatibility convention is different from SemVer in the way it treats
@@ -65,9 +65,9 @@ version, then minor- and patch-level changes are allowed.
6565
`~1.2.3` is an example of a tilde requirement.
6666

6767
```notrust
68-
~1.2.3 := >=1.2.3 <1.3.0
69-
~1.2 := >=1.2.0 <1.3.0
70-
~1 := >=1.0.0 <2.0.0
68+
~1.2.3 := >=1.2.3, <1.3.0
69+
~1.2 := >=1.2.0, <1.3.0
70+
~1 := >=1.0.0, <2.0.0
7171
```
7272

7373
### Wildcard requirements
@@ -79,8 +79,8 @@ positioned.
7979

8080
```notrust
8181
* := >=0.0.0
82-
1.* := >=1.0.0 <2.0.0
83-
1.2.* := >=1.2.0 <1.3.0
82+
1.* := >=1.0.0, <2.0.0
83+
1.2.* := >=1.2.0, <1.3.0
8484
```
8585

8686
### Comparison requirements
@@ -99,8 +99,8 @@ Here are some examples of comparison requirements:
9999

100100
### Multiple requirements
101101

102-
Multiple version requirements can also be separated with a comma, e.g., `>= 1.2,
103-
< 1.5`.
102+
As shown in the examples above, multiple version requirements can be
103+
separated with a comma, e.g., `>= 1.2, < 1.5`.
104104

105105
### Specifying dependencies from other registries
106106

0 commit comments

Comments
 (0)