cleanup: Remove error-format special-case in `cargo fix`
`cargo fix` had some special handling to deal with ensuring that the `--error-format=json` flag was passed to rustc. However, cargo was changed in https://github.com/rust-lang/cargo/pull/7450 to always pass that flag. This special handling is no longer necessary, so this PR removes it.
`cargo fix` had some special handling to deal with ensuring that the
`--error-format=json` flag was passed to rustc. However, cargo was
changed in https://github.com/rust-lang/cargo/pull/7450 to always pass
that flag. This special handling is no longer necessary, so this PR
removes it.
`cargo fix`: always inherit the jobserver
https://github.com/rust-lang/cargo/pull/12951 changed `cargo fix` to ensure that `rustc` has access to the jobserver. However, it only did that for the final "verification" step. It was not set for any of the previous calls to rustc (which is up to ~5 calls).
I'm not sure if this was done intentionally, I did not see any discussion of this in #12951.
This isn't too important in the grand scheme of things, because `rustc` is not doing codegen, so the parallel behavior is currently not used. However, this removes an extraneous `warning: failed to connect to jobserver from environment variable` warning that is printed in cargo's log every time it runs rustc. It also might be relevant in the future if rustc enables the parallel frontend.
`cargo add` - fix for adding features from repository with multiple packages.
Fixes#13121
As discussed in the issue, when using `cargo add` to add a package with features from a git repository from one of it's members, the command might fail due to improper target for querying for said features.
This PR adds a test for this edge-case where we expect it to fail with current code. It also adds a fix for this, and updates the test to expect success.
While populating available features, the current code does a `Fuzzy` search which might lead to searching for features in a wrong member package. If we change it to an `Exact` query, we get back the proper member to search within.
Add cargo:rustc-cdylib-link-arg into RESERVED_PREFIXES list
After https://github.com/rust-lang/cargo/pull/12201 was merged, the `cargo:rustc-cdylib-link-arg` in build script no longer works
```rs
println!("cargo:rustc-cdylib-link-arg=-Wl");
println!("cargo:rustc-cdylib-link-arg=-undefined");
println!("cargo:rustc-cdylib-link-arg=dynamic_lookup");
```
chore(doc): doc for custom subcommands look up.
### What does this PR try to resolve?
as the https://github.com/rust-lang/cargo/issues/13194 metions, the lookup rules for custom subcommands are only reflected in comments inside the code, and it is time to inform users of this behavior through documentation.
### How should we test and review this PR?
### Additional information
fix: clarify `--path` is the installation source not destination
### What does this PR try to resolve?
There is a misunderstanding of “default location” mentioned in `cargo install --help`.
I don't think one-line explanation helps much there, So remove that imprecise description.
This PR also add more "from" for places mentioning installation sources.
### How should we test and review this PR?
Read the new help text.
Rework `--check-cfg` generation comment
While working on something related to `--check-cfg`, I looked back at this comment and realized it could be improved, so here is my PR improving it.