@@ -260,7 +260,7 @@ If after trying to debug your issue, however, you're still running into problems
260
260
then feel free to [ open an
261
261
issue] ( https://github.com/rust-lang/cargo/issues/new ) !
262
262
263
- ### What does “ version's conflict” mean and how to resolve it?
263
+ ### What does " version conflict" mean and how to resolve it?
264
264
265
265
> failed to select a version for ` x ` which could resolve this conflict
266
266
@@ -270,39 +270,39 @@ This is one of the most annoying error message for Cargo users. There are severa
270
270
situations may lead us to a version conflict. Below we'll walk through possible
271
271
causes and provide diagnostic techniques to help you out there:
272
272
273
- - The project and its dependencies use [ links] [ links ] to repeatedly link the local
274
- library. Cargo forbids linking two packages with the same native library, so even
275
- with multiple layers of dependencies it is not allowed. In this case, the error
276
- message will prompt: `Only one package in the dependency graph may specify the same
277
- links value`, you need to manually check and delete duplicate link values. however,
278
- that there are [ conventions in place ] [ conventions-in- place ] to alleviate this.
273
+ - The project and its dependencies use [ links] to repeatedly link the local
274
+ library. Cargo forbids linking two packages with the same native library, so
275
+ even with multiple layers of dependencies it is not allowed. In this case, the
276
+ error message will prompt: `Only one package in the dependency graph may specify
277
+ the same links value`, you may need to manually check and delete duplicate link
278
+ values. The community also have [ conventions in place] to alleviate this.
279
279
280
280
- When depending on different crates in the project, if these crates use the same
281
- dependent library, but the version used is restricted, making it impossible to
282
- determine the correct version, it will also cause conflicts.The error message will
283
- prompt: ` all possible versions conflict with previously selected packages ` . Please
284
- modify the version requirements to make them consistent.
281
+ dependent library, but the version used is restricted, making it impossible to
282
+ determine the correct version, it will also cause conflicts. The error message
283
+ will prompt: ` all possible versions conflict with previously selected packages ` .
284
+ You may need to modify the version requirements to make them consistent.
285
285
286
286
- If there are multiple versions of dependencies in the project, when using
287
- [ ` direct-minimal-versions ` ] [ direct-minimal-versions ] , the minimum version
288
- requirements cannot be met, which will cause conflicts. Please check in the
289
- dependency graph of the project, the version requirements for dependencies
290
- are inconsistent. Please modify the version requirements to make them consistent.
287
+ [ ` direct-minimal-versions ` ] , the minimum version requirements cannot be met,
288
+ which will cause conflicts. Please check in the dependency graph of the project,
289
+ the version requirements for dependencies are inconsistent. Please modify the
290
+ version requirements to make them consistent.
291
291
292
292
- If the dependent crate does not have the features you choose, it will also
293
- cause conflicts. At this time, you need to check the dependent version and its
294
- features.
293
+ cause conflicts. At this time, you need to check the dependent version and its
294
+ features.
295
295
296
- Conflicts occur when merging branches or PRs, if there are non-trivial conflicts,
297
- you can reset all "yours" changes, fix all other conflicts in the branch, and then
298
- run some cargo command (like ` cargo tree ` or ` cargo check ` ), which should re-update
299
- the lockfile with your own local changes. If you previously ran some ` cargo update `
300
- commands in your branch, you can re-run them that this time. The community has been
301
- looking to resolve merge conflicts with ` Cargo.lock ` and ` Cargo.toml ` using a
302
- [ custom merge tool ] [ custom- merge- tool ] .
296
+ - Conflicts may occur when merging branches or PRs, if there are non-trivial
297
+ conflicts, you can reset all "yours" changes, fix all other conflicts in the
298
+ branch, and then run some cargo command (like ` cargo tree ` or ` cargo check ` ),
299
+ which should re-update the lockfile with your own local changes. If you previously
300
+ ran some ` cargo update ` commands in your branch, you can re-run them that this
301
+ time. The community has been looking to resolve merge conflicts with ` Cargo.lock `
302
+ and ` Cargo.toml ` using a [ custom merge tool] .
303
303
304
304
305
305
[ links ] : https://doc.rust-lang.org/cargo/reference/resolver.html#links
306
- [ conventions-in- place ] : https://doc.rust-lang.org/cargo/reference/build-scripts.html#-sys-packages
307
- [ direct-minimal-versions ] : https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#direct-minimal-versions
308
- [ custom- merge- tool ] : https://github.com/rust-lang/cargo/issues/1818
306
+ [ conventions in place ] : https://doc.rust-lang.org/cargo/reference/build-scripts.html#-sys-packages
307
+ [ ` direct-minimal-versions` ] : https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#direct-minimal-versions
308
+ [ custom merge tool ] : https://github.com/rust-lang/cargo/issues/1818
0 commit comments