Description
Problem
The Cargo Book says:
Caret requirements are an alternative syntax for the default strategy,
^1.2.3
is exactly equivalent to1.2.3
.
This phrasing has an unfortunate interpretation for Rust newbies, who may take the statement to mean that caret means the exact version identifier.
A very careful reading reveals that caret is merely the default semantic, but is not exactly equivalent to any fixed version. Some users may get tripped up by this ambiguity.
Possible Solution(s)
We can help the reader to disambiguate Cargo syntax and semantics. For example, adjust the section to say something like:
The caret prefix is also the default version resolution strategy; it may be omitted. Both
^1.2.3
and1.2.3
match the latest available, Cargo SemVer compatible release that Cargo can find.
Activity