Skip to content

Commit 50fd163

Browse files
authored
Mention x.y.* as a kind of version requirement to avoid.
`x.y.*` is equivalent to `>=x.y.0, <x.y+1.0`, so it can create an unresolvable conflict in the same way as already discussed.
1 parent bc577dc commit 50fd163

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,19 +162,19 @@ is ignored and should not be used in version requirements.
162162
> [#10599]).
163163
>
164164
> Avoid constraining the upper bound of a version to be anything less than the
165-
> next semver incompatible version
166-
> (e.g. avoid `">=2.0, <2.4"`) as other packages in the dependency tree may
165+
> next semver incompatible version (e.g. avoid `">=2.0, <2.4"` or `"2.0.*"`),
166+
> as other packages in the dependency tree may
167167
> require a newer version, leading to an unresolvable error (see [#9029]).
168168
> Consider whether controlling the version in your [`Cargo.lock`] would be more
169169
> appropriate.
170170
>
171171
> In some instances this won't matter or the benefits might outweigh the cost, including:
172-
> - When no one else depends on your package e.g. it only has a `[[bin]]`
172+
> - When no one else depends on your package; e.g. it only has a `[[bin]]`
173173
> - When depending on a pre-release package and wishing to avoid breaking
174-
> changes then a fully specified `"=1.2.3-alpha.3"` might be warranted (see
174+
> changes, then a fully specified `"=1.2.3-alpha.3"` might be warranted (see
175175
> [#2222])
176176
> - When a library re-exports a proc-macro but the proc-macro generates code that
177-
> calls into the re-exporting library then a fully specified `=1.2.3` might be
177+
> calls into the re-exporting library, then a fully specified `=1.2.3` might be
178178
> warranted to ensure the proc-macro isn't newer than the re-exporting library
179179
> and generating code that uses parts of the API that don't exist within the
180180
> current version

0 commit comments

Comments
 (0)