Fix built-in aliases taking arguments.
The built-in aliases weren't parsing their arguments. Change implementation to treat built-in aliases the same as user aliases.
Fixes#6381
Include executable in JSON output.
Fixes#5426
Rebase of @patriksvensson's #5517
CC @matklad
I didn't really get into the issue or the code, I just interatively rebased Patrik's branch and then massaged and cleaned up the code until the tests passed. So please double check it for code correctness, test case correctness and test case coverage.
Particularly the branch changed an if condition according to [this suggestion](https://github.com/rust-lang/cargo/pull/5517#issuecomment-388557248) by Aleksey. I rolled that back because at one point it helped fix a series of tests. But let me know if that should be included here.
ConflictStoreTrie: Faster filtered search
This is an optimization that I was thinking of doing in #6283. I did not then as this is optimizing a not particularly hot path. I wish to do it now as it is stuck in my head, and I need that head space for more important things.
This also "accidentally" fixes the [indeterminacy](https://github.com/rust-lang/cargo/pull/6283#issuecomment-443358988) introduced in #6283, by replacing the `HashMap.iter().find()` like code with `BTreeMap.iter().find()` like code. This is not strictly needed, as @alexcrichton pointed out (In most use cases the index will change between any two invocations anyway), but does make it much easier to deal with (fuzz) test cases.
use allow-dirty option in `cargo package` to skip vcs checks
If `cargo package` is run for a crate that is not version controlled in
a way that cargo expects, git2 will overreach upwards and grab a
irrelevant .git repo. This change uses `--allow-dirty` to imply to `cargo package` that it should not be checking for version control information, fixing this issue.
remove clones made redundant by Intern PackageId
This is a follow up to #6332. I used clippy to find all the places we called `.clone()` on a `PackageId` or where we passed `&PackageId`. Yes that touches 44 files and 400+ lines, that is way we wanted `PackageId` to be `copy`.
To avoid introducing another flag, this change uses the `--allow-dirty`
flag to skip checking for vcs information. This is logical because a
user that passes that flag is indicating to `cargo package` that they
do not care about the state of vcs at that time.
If `cargo package` is run for a crate that is not version controlled in
a way that cargo expects, git2 will overreach upwards and grab a
irrelevant .git repo. This change adds `--no-vcs` as an option to
`cargo package` to prevent this.
docs: correct profile usage of `cargo test --release`
From trying it out on a project (see <https://github.com/PROSIC/libprosic/pull/54#issuecomment-441211463>), I have realised that the `profile` usage by `cargo test --release` differs from what is documented in the cargo book. So here comes my correction suggestion...