From f6feaef1b734bb9780064b2c9553fef38aa9eeb8 Mon Sep 17 00:00:00 2001 From: Jeehoon Kang Date: Fri, 23 Mar 2018 03:25:28 +0900 Subject: [PATCH] doc: Clarify the meaning of caret requirements Closes #4910 --- src/doc/src/reference/specifying-dependencies.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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: -- 2.30.2