@@ -50,7 +50,7 @@ This is different from [SemVer] which considers all pre-1.0.0 packages to be inc
50
50
51
51
### Caret requirements
52
52
53
- ** Caret requirements** are the default version requirement strategy.
53
+ ** Caret requirements** are the default version requirement strategy.
54
54
This version strategy allows [ SemVer] compatible updates.
55
55
They are specified as version requirements with a leading caret (` ^ ` ).
56
56
@@ -213,7 +213,7 @@ regex = { git = "https://github.com/rust-lang/regex.git" }
213
213
```
214
214
215
215
Cargo fetches the ` git ` repository at that location and traverses the file tree to find
216
- ` Cargo.toml ` file for the requested crate anywhere inside the ` git ` repository.
216
+ ` Cargo.toml ` file for the requested crate anywhere inside the ` git ` repository.
217
217
For example, ` regex-lite ` and ` regex-syntax ` are members of ` rust-lang/regex ` repo
218
218
and can be referred to by the repo's root URL (` https://github.com/rust-lang/regex.git ` )
219
219
regardless of where in the file tree they reside.
@@ -240,7 +240,7 @@ regex = { git = "https://github.com/rust-lang/regex.git", branch = "next" }
240
240
241
241
Anything that is not a branch or a tag falls under ` rev ` key. This can be a commit
242
242
hash like ` rev = "4c59b707" ` , or a named reference exposed by the remote
243
- repository such as ` rev = "refs/pull/493/head" ` .
243
+ repository such as ` rev = "refs/pull/493/head" ` .
244
244
245
245
What references are available for the ` rev ` key varies by where the repo is hosted.
246
246
GitHub exposes a reference to the most recent commit of every pull request as in the example above.
@@ -280,7 +280,7 @@ The `version` key always implies that the package is available in a registry,
280
280
regardless of the presence of ` git ` or ` path ` keys.
281
281
282
282
The ` version ` key does _ not_ affect which commit is used when Cargo retrieves the ` git ` dependency,
283
- but Cargo checks the version information in the dependency's ` Cargo.toml ` file
283
+ but Cargo checks the version information in the dependency's ` Cargo.toml ` file
284
284
against the ` version ` key and raises an error if the check fails.
285
285
286
286
In this example, Cargo retrieves the HEAD commit of the branch called ` next ` from Git and checks if the crate's version
@@ -291,7 +291,7 @@ is compatible with `version = "1.10.3"`:
291
291
regex = { version = " 1.10.3" , git = " https://github.com/rust-lang/regex.git" , branch = " next" }
292
292
```
293
293
294
- ` version ` , ` git ` , and ` path ` keys are considered separate locations for resolving the dependency.
294
+ ` version ` , ` git ` , and ` path ` keys are considered separate locations for resolving the dependency.
295
295
See [ Multiple locations] ( #multiple-locations ) section below for detailed explanations.
296
296
297
297
> ** Note** : [ crates.io] does not allow packages to be published with
@@ -519,7 +519,6 @@ manifest:
519
519
cc = " 1.0.3"
520
520
```
521
521
522
-
523
522
You can also have target-specific build dependencies by using
524
523
` build-dependencies ` in the target section header instead of ` dependencies ` . For
525
524
example:
@@ -647,7 +646,6 @@ cc.workspace = true
647
646
rand = { workspace = true , optional = true }
648
647
```
649
648
650
-
651
649
[ SemVer ] : https://semver.org
652
650
[ crates.io ] : https://crates.io/
653
651
[ dev-dependencies ] : #development-dependencies
0 commit comments