Fix for #11555
Fix for #11555. I more or less blindly followed the instructions given by `@weihanglo` in the description of the issue:
1. I replaced every link from `doc.crates.io/contrib/apidoc/cargo` with `doc.rust-lang.org/nightly/nightly-rustc/cargo`
2. Added redirection rule to `src/doc/contrib/book.toml` that should redirect the `/apidoc/cargo/` endpoint to `https://doc.rust-lang.org/nightly/nightly-rustc/cargo`
3. Reverted the changes made to the CI workflow in ba3d2e981b and 1c82d9c8c3 (building the api docs as part of the contribution guide)
chore: Fix typos
Seeing several typo PRs, like #11560, I figured I'd run my source code spell checker on cargo to help catch a lot of these earlier, in one big batch.
Fix panic on target dependency errors.
Errors while processing a target dependency would cause a panic due to some calls to `unwrap` in the TOML processing code. Those unwraps should not be there, and it should just propagate the errors upwards just like is done for normal dependencies.
Fixes#11540
Add note to release notes about rejecting multiple registries.
This adds a note to the changelog about a change in stable behavior as part of the implementation of RFC 3139.
cc #11524
Support vendoring with different revs from same git repo
### What does this PR try to resolve?
Fixes#10667
### How should we test and review this PR?
test case is included
fix: deduplicate dependencies by artifact target
### What does this PR try to resolve?
In cases when a compile target is specified for a bindep and the crate depending on it, cargo fails to deduplicate the crate dependencies and attempts to build the dependent crate only once with non-deterministic feature set, which breaks e.g. https://github.com/rvolosatovs/musl-bindep-feature-bug
Fix the issue by including the optional artifact compile target in the `Unit` in order to avoid wrongfully deduplicating the dependent crates
Fixes https://github.com/rust-lang/cargo/issues/11463
Fixes https://github.com/rust-lang/cargo/issues/10837
Fixes https://github.com/rust-lang/cargo/issues/10525
Note, that this issue is already accounted for by `cargo`, but in different context a similar situation can occur while building the build script, which:
1. may be built for different target than the actual package target
2. may contain dependencies with different feature sets than the same dependencies in the dependency graph of the package itself
That's why this PR is simply reusing the existing functionality for deduplication
### How should we test and review this PR?
Build https://github.com/rvolosatovs/musl-bindep-feature-bug
### Additional information
This is based on analysis by `@weihanglo` in https://github.com/rust-lang/cargo/issues/10837#issuecomment-1339365374
I experimented with adding the whole `UnitFor` to the internal unit struct, but that seems unnecessary.
It would probably be nicer to refactor `IsArtifact` and instead turn it into a 3-variant enum with a possible compile target, but I decided against that to minimize the diff. Perhaps it's worth a follow-up?