Wait up to one second while waiting for curl
### What does this PR try to resolve?
close https://github.com/rust-lang/cargo/issues/8516
Wait up to one second while waiting for curl.
### How should we test and review this PR?
1. Build cargo
2. Start a network transfer (cargo fetch).
3. Pull the network cord.
4. Wait.
Use locked_version more
In #9847 we added better tracking for when a requirement came from a lockfile. This uses that tracking in a few more error messages.
Closes#10391
Disable dependabot
I don't think this has ever actually sent a meaningful version bump PR
we weren't already aware of, so unless someone else wants to be in
charge of these I'm going to go ahead and disable dependabot.
Update git2 dependencies
This pull-request update git2 to 0.14.1 and git2-curl to 0.15.0 and libgit2-sys to 0.13.1.
This fix a memory corruption that I have locally when running the testsuite:
```
==2338650== Uninitialised value was created by a stack allocation
==2338650== at 0x11FE3A0: git2::remote::Remote::fetch (remote.rs:276)
```
I don't think this has ever actually sent a meaningful version bump PR
we weren't already aware of, so unless someone else wants to be in
charge of these I'm going to go ahead and disable dependabot.
Enable propagating host rustflags to build scripts
### What does this PR try to resolve?
This PR primarily fixes#10206, but in doing so it also slightly modifies the interface for the unstable `target-applies-to-host` feature (#9453), and adds the unstable `target-applies-to-host-kind` flag to mirror `target-applies-to-host` for build scripts and other host artifacts.
The commit messages have more in-depth discussion.
### How should we test and review this PR?
The test case from #10206 now works rather than producing an error. It has also been added a regression test case. A few additional test cases have also been added to handle the expected behavior around rustflags for build scripts with and without `target-applies-to-host-kind` enabled.
### Additional information
1. This changes the interface for `target-applies-to-host` so that it does not need to be specified twice to be used. And it can still be set through configuration files using the `[unstable]` table. However, we may(?) want to pick a stable format for in-file configuration of this setting unless we intend for it to only ever be a command-line flag.
2. It may be that `target-applies-to-host-kind` is never behavior we want users to turn on, and that it should therefore simply be removed and hard-coded as being `false`.
3. It's not entirely clear how `target-applies-to-host-kind` should interact with `-Zmultitarget`. If, for example, `requested_kinds = [HostTarget, SomeOtherTarget]` and `kind.is_host()`, should `RUSTFLAGS` take effect or not? For the time being I've just hard-coded the behavior for single targets, and the answer would be "no".
feat(search): Highlight search term
This supersedes #10116. For the requested colored-output tests, this followed the pattern of the `fix` tests which just detects whether colored output is used or not. The `cache_messages` actually verify the output is colored but that is because it can just compare to a rustc call's output. Getting the colored output correct by hand in a test (with all of the resets) is a bit messy and would be brittle.
This was done in an exercise in exploring ways to generalize colored output support in preparation for `cargo-add` doing some colored output as well.
I converted all output calls to use this approach, even if coloring wasn't used, for consistency. I considered coloring the overflow message but decided to hold off on that for now (either a warning-yellow or a hint-gray).
Fixes#9918
Add -Z check-cfg-features support for rustdoc
This PR is a follow to https://github.com/rust-lang/cargo/pull/10408 where support for compile-time checking of features was implemented for `rustc`.
At the time `rustdoc` support wasn't yet merged, but now that it has been [merged](https://github.com/rust-lang/rust/pull/94154), this pull-request add support for it in the `doc` and `test --doc` (doctest) mode.
r? `@alexcrichton`
`std:🧵:available_parallelism` has been stabilized since 1.59.0.
Also, we don't want to block timing data output, so if parallelism
data is not available the table will display `ncpu=n/a` instead.
Instead of writing override rules all over the compilation logic, this
commit simply override the unit created by `generate_targets`.
As a result, `cargo rustc --crate-type` behaves exactly as expected.
This provides a more general approach for writing output. This will
respect the users choice for output support but the user must check the
verbosity if its relevant to their output.