### What does this PR try to resolve?
This preps more features for cargo-script support and makes it clearer
where we don't yet support it.
### How should we test and review this PR?
### Additional information
### What does this PR try to resolve?
rustc considers the following valid and without a shebang:
```rust
// Hello
[allow(dead_code)]
fn main() {
println!("Hello, world!");
}
```
and
```rustc
[allow(dead_code)]
fn main() {
println!("Hello, world!");
}
```
In both cases, we consider it to have a shebang. This commit documents
that intention.
We could add our own heuristics
(e.g. `#!` with only whitespace is not a shebang)
but we should either be a subset or intentionally different than rustc
(e.g. require a non `[`-prefixes interpreter)
rather than do both.
Fixes#15170
### How should we test and review this PR?
This will be reflected in the tracking issue which will handle the final
decision for the team on this matter.
### Additional information
rustc considers the following valid and without a shebang:
```rust
// Hello
[allow(dead_code)]
fn main() {
println!("Hello, world!");
}
```
and
```rustc
[allow(dead_code)]
fn main() {
println!("Hello, world!");
}
```
In both cases, we consider it to have a shebang. This commit documents
that intention.
We could add our own heuristics
(e.g. `#!` with only whitespace is not a shebang)
but we should either be a subset or intentionally different than rustc
(e.g. require a non `[`-prefixes interpreter)
rather than do both.
This will be reflected in the tracking issue which will handle the final
decision for the team on this matter.
Fixes#15170
### What does this PR try to resolve?
This is a part of #12207
Now that the experiment is over and we can be intrusive, this merges all
of the permanent cargo-script manifest logic into the regular manifest
loading code path with the goal of reducing the number of places people
need to be aware to check to know how things work so we're less likely
to overlook them (e.g. `package.name`s being optional). This should also
make error reporting better as we will eventually only use the real
manifest users specify, instead of one with a lot of edits by us.
This comes at the cost of some uglier code needed to check some of these
cases.
### How should we test and review this PR?
### Additional information
### What does this PR try to resolve?
Adds workspace feature unification for #14774
### How should we test and review this PR?
In a workspace that has dependencies with different activated features
depending on the packages being built, add the
`resolver.feature-unification = "workspace"` option to
`.cargo/config.toml`. Build the entire workspace with `--workspace` and
then build individual packages, ensuring no dependencies are being
recompiled.
### Additional information
Originally, the RFC and tracking issue mention some more complex changes
required in cargo's dependency/feature resolution phases in order to
support workspace feature unification. However, it seems like it also
works by just modifying the list of `PackageIdSpec`s passed to the
workspace resolver to include all workspace members, and then using the
original list of specs when generating the build units. I'm wondering if
I missed something because this change feels a bit *too* simple...
I tested it on a fairly large workspace containing about 100 packages
and didn't see any recompilations when building with different sets of
packages. I also added an integration test that verifies the correct
features are enabled. If there are any other test cases I should
include, please let me know and I'll try to add it.
This fixes a race condition in the `panic_abort_tests` test which can
randomly fail. Prior to https://github.com/rust-lang/cargo/pull/14226
the test would check the lines individually (which was also kinda broken
for the same reason, but wouldn't actually fail).
`cargo deny` is complaining about some deprecated settings in our
`deny.toml`. This updates it to the latest structure, and also
synchronizes the file with the latest template.
### What does this PR try to resolve?
`\h` controls horizontal spacing.
This changes unordered lists from moving 2 units (`\h'+02'`) to 3 units
(`\h'+03'`).
This looks more nature.
Most other popular software programs follow the same style.
For example, git-merge, tar, and bash.
### How should we test and review this PR?
```
cargo build
target/debug/cargo help package
```
### Additional information
This was found during #15148.
### What does this PR try to resolve?
Some very small simplifications made while poking around the resolver. I
was trying to understand when we would end up hitting a `continue` in
the code. The easiest way was to run the tests with a panic instead.
Turns out I was right, we cannot/(can no longer) hit that code path.
Which allowed us to simplify some other surrounding code.
### How should we test and review this PR?
All tests pass on each commit.
### Additional information