Skip to content

Commit 4c10811

Browse files
committed
Auto merge of #12679 - tompscanlan:caret-doc, r=weihanglo
doc: clarify caret requirements ### What does this PR try to resolve? clearing up caret version requirements possibly fixes #12112 ### How should we test and review this PR? expert review...
2 parents da498c8 + 0454f95 commit 4c10811

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,17 @@ using special operators, though it shouldn't be necessary most of the time.
5757

5858
### Caret requirements
5959

60-
**Caret requirements** are an alternative syntax for the default strategy,
61-
`^1.2.3` is exactly equivalent to `1.2.3`.
60+
**Caret requirements** are the default version requirement strategy.
61+
This version strategy allows [SemVer] compatible updates.
62+
They are specified as version requirements with a leading caret (`^`).
63+
64+
`^1.2.3` is an example of a caret requirement.
65+
66+
Leaving off the caret is a simplified equivalent syntax to using caret requirements.
67+
While caret requirements are the default, it is recommended to use the
68+
simplified syntax when possible.
69+
70+
`log = "^1.2.3"` is exactly equivalent to `log = "1.2.3"`.
6271

6372
### Tilde requirements
6473

0 commit comments

Comments
 (0)