From: Jeehoon Kang Date: Thu, 22 Mar 2018 18:25:28 +0000 (+0900) Subject: doc: Clarify the meaning of caret requirements X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~2^2~17^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f6feaef1b734bb9780064b2c9553fef38aa9eeb8;p=cargo.git doc: Clarify the meaning of caret requirements Closes #4910 --- diff --git a/src/doc/src/reference/specifying-dependencies.md b/src/doc/src/reference/specifying-dependencies.md index 893be3fce..b7c780a1b 100644 --- a/src/doc/src/reference/specifying-dependencies.md +++ b/src/doc/src/reference/specifying-dependencies.md @@ -29,10 +29,11 @@ if we had specified `"^0.1.12"`, which is called a caret requirement. **Caret requirements** allow SemVer compatible updates to a specified version. An update is allowed if the new version number does not modify the left-most non-zero digit in the major, minor, patch grouping. In this case, if we ran -`cargo update -p time`, cargo would update us to version `0.1.13` if it was -available, but would not update us to `0.2.0`. If instead we had specified the -version string as `^1.0`, cargo would update to `1.1` but not `2.0`. The version -`0.0.x` is not considered compatible with any other version. +`cargo update -p time`, cargo should update us to version `0.1.13` if it is the +latest `0.1.z` release, but would not update us to `0.2.0`. If instead we had +specified the version string as `^1.0`, cargo should update to `1.1` if it is +the latest `1.y` release, but not `2.0`. The version `0.0.x` is not considered +compatible with any other version. Here are some more examples of caret requirements and the versions that would be allowed with them: