Skip to content

Commit f147d52

Browse files
committed
docs(resolver): Move all constraints under one header
1 parent 8e872ac commit f147d52

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/doc/src/reference/resolver.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ resolver.
7070
[dependency specification]: specifying-dependencies.md
7171
[`cargo tree`]: ../commands/cargo-tree.md
7272

73-
## SemVer compatibility
73+
## Constraints and Heuristics
74+
75+
### SemVer compatibility
7476

7577
Cargo uses [SemVer] for specifying version numbers. This establishes a common
7678
convention for what is compatible between different versions of a package. See
@@ -151,7 +153,7 @@ the `0.4` release of the `log` package.
151153
[SemVer Compatibility]: semver.md
152154
[Version-incompatibility hazards]: #version-incompatibility-hazards
153155

154-
### Version-incompatibility hazards
156+
#### Version-incompatibility hazards
155157

156158
When multiple versions of a crate appear in the resolve graph, this can cause
157159
problems when types from those crates are exposed by the crates using them.
@@ -186,12 +188,6 @@ ecosystem if you publish a SemVer-incompatible version of a popular library.
186188
[semver trick]: https://github.com/dtolnay/semver-trick
187189
[`downcast_ref`]: ../../std/any/trait.Any.html#method.downcast_ref
188190

189-
## Other constraints
190-
191-
Version requirements aren't the only constraint that the resolver considers
192-
when selecting and unifying dependencies. The following sections cover some of
193-
the other constraints that can affect resolution.
194-
195191
### Features
196192

197193
For the purpose of generating `Cargo.lock`, the resolver builds the dependency
@@ -611,6 +607,7 @@ circumstances:
611607
var fragments = {
612608
"#version-metadata": "specifying-dependencies.html#version-metadata",
613609
"#pre-releases": "specifying-dependencies.html#pre-releases",
610+
"#other-constraints": "#constraints-and-heuristics",
614611
};
615612
var target = fragments[window.location.hash];
616613
if (target) {

0 commit comments

Comments
 (0)