# Changelog
-## Cargo 1.53 (2021-06-17)
-[90691f2b...HEAD](https://github.com/rust-lang/cargo/compare/90691f2b...HEAD)
+## Cargo 1.58 (2022-01-13)
+[b2e52d7c...HEAD](https://github.com/rust-lang/cargo/compare/b2e52d7c...HEAD)
+
+### Added
+
+- Added `rust_version` field to package data in `cargo metadata`.
+ [#9967](https://github.com/rust-lang/cargo/pull/9967)
+
+### Changed
+
+### Fixed
+
+- Doctests now include rustc-link-args from build scripts.
+ [#9916](https://github.com/rust-lang/cargo/pull/9916)
+
+### Nightly only
+
+- Make future-incompat-report output more user-friendly.
+ [#9953](https://github.com/rust-lang/cargo/pull/9953)
+
+## Cargo 1.57 (2021-12-02)
+[18751dd3...rust-1.57.0](https://github.com/rust-lang/cargo/compare/18751dd3...rust-1.57.0)
+
+### Added
+
+- 🎉 Added custom named profiles. This also changes the `test` and `bench`
+ profiles to inherit their settings from `dev` and `release`, and Cargo will
+ now only use a single profile during a given command instead of using
+ different profiles for dependencies and cargo-targets.
+ [docs](https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#custom-profiles)
+ [#9943](https://github.com/rust-lang/cargo/pull/9943)
+- The `rev` option for a git dependency now supports git references that start
+ with `refs/`. An example where this can be used is to depend on a pull
+ request from a service like GitHub before it is merged.
+ [#9859](https://github.com/rust-lang/cargo/pull/9859)
+- Added `path_in_vcs` field to the `.cargo_vcs_info.json` file.
+ [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-package.html#cargo_vcs_infojson-format)
+ [#9866](https://github.com/rust-lang/cargo/pull/9866)
+
+### Changed
+
+- ❗ `RUSTFLAGS` is no longer set for build scripts. This change was made in
+ 1.55, but the release notes did not highlight this change. Build scripts
+ should use `CARGO_ENCODED_RUSTFLAGS` instead. See the
+ [documentation](https://doc.rust-lang.org/nightly/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts)
+ for more details.
+- The `cargo version` command now includes some extra information.
+ [#9968](https://github.com/rust-lang/cargo/pull/9968)
+- Updated libgit2 to 1.3 which brings in a number of fixes and changes to git
+ handling.
+ [#9963](https://github.com/rust-lang/cargo/pull/9963)
+ [#9988](https://github.com/rust-lang/cargo/pull/9988)
+- Shell completions now include shorthand b/r/c/d subcommands.
+ [#9951](https://github.com/rust-lang/cargo/pull/9951)
+- `cargo update --precise` now allows specifying a version without semver
+ metadata (stuff after `+` in the version number).
+ [#9945](https://github.com/rust-lang/cargo/pull/9945)
+- zsh completions now complete `--example` names.
+ [#9939](https://github.com/rust-lang/cargo/pull/9939)
+- The progress bar now differentiates when building unittests.
+ [#9934](https://github.com/rust-lang/cargo/pull/9934)
+- Some backwards-compatibility support for invalid TOML syntax has been removed.
+ [#9932](https://github.com/rust-lang/cargo/pull/9932)
+- Reverted the change from 1.55 that triggered an error for dependency
+ specifications that did not include any fields.
+ [#9911](https://github.com/rust-lang/cargo/pull/9911)
+
+### Fixed
+
+- Removed a log message (from `CARGO_LOG`) that may leak tokens.
+ [#9873](https://github.com/rust-lang/cargo/pull/9873)
+- `cargo fix` will now avoid writing fixes to the global registry cache.
+ [#9938](https://github.com/rust-lang/cargo/pull/9938)
+- Fixed `-Z help` CLI option when used with a shorthand alias (b/c/r/d).
+ [#9933](https://github.com/rust-lang/cargo/pull/9933)
+
+
+### Nightly only
+
+
+## Cargo 1.56 (2021-10-21)
+[cebef295...rust-1.56.0](https://github.com/rust-lang/cargo/compare/cebef295...rust-1.56.0)
+
+### Added
+
+- 🎉 Cargo now supports the 2021 edition.
+ More information may be found in the [edition
+ guide](https://doc.rust-lang.org/nightly/edition-guide/rust-2021/index.html).
+ [#9800](https://github.com/rust-lang/cargo/pull/9800)
+- 🎉 Added the
+ [`rust-version`](https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field)
+ field to `Cargo.toml` to specify the minimum supported Rust version, and the
+ `--ignore-rust-version` command line option to override it.
+ [#9732](https://github.com/rust-lang/cargo/pull/9732)
+- Added the `[env]` table to config files to specify environment variables to
+ set.
+ [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#env)
+ [#9411](https://github.com/rust-lang/cargo/pull/9411)
+- `[patch]` tables may now be specified in config files.
+ [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#patch)
+ [#9839](https://github.com/rust-lang/cargo/pull/9839)
+- `cargo doc` now supports the `--example` and `--examples` flags.
+ [#9808](https://github.com/rust-lang/cargo/pull/9808)
+- 🎉 Build scripts can now pass additional linker arguments for binaries or all
+ linkable targets. [docs](https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#outputs-of-the-build-script)
+ [#9557](https://github.com/rust-lang/cargo/pull/9557)
+- Added support for the `-p` flag for `cargo publish` to publish a specific
+ package in a workspace. `cargo package` also now supports `-p` and
+ `--workspace`.
+ [#9559](https://github.com/rust-lang/cargo/pull/9559)
+- Added documentation about third-party registries.
+ [#9830](https://github.com/rust-lang/cargo/pull/9830)
+- Added the `{sha256-checksum}` placeholder for URLs in a registry `config.json`.
+ [docs](https://doc.rust-lang.org/nightly/cargo/reference/registries.html#index-format)
+ [#9801](https://github.com/rust-lang/cargo/pull/9801)
+- Added a warning when a dependency does not have a library.
+ [#9771](https://github.com/rust-lang/cargo/pull/9771)
+
+### Changed
+
+- Doc tests now support the `-q` flag to show terse test output.
+ [#9730](https://github.com/rust-lang/cargo/pull/9730)
+- `features` used in a `[replace]` table now issues a warning, as they are ignored.
+ [#9681](https://github.com/rust-lang/cargo/pull/9681)
+- Changed so that only `wasm32-unknown-emscripten` executables are built
+ without a hash in the filename. Previously it was all `wasm32` targets.
+ Additionally, all `apple` binaries are now built with a hash in the
+ filename. This allows multiple copies to be cached at once, and matches the
+ behavior on other platforms (except `msvc`).
+ [#9653](https://github.com/rust-lang/cargo/pull/9653)
+- `cargo new` now generates an example that doesn't generate a warning with
+ clippy.
+ [#9796](https://github.com/rust-lang/cargo/pull/9796)
+- `cargo fix --edition` now only applies edition-specific lints.
+ [#9846](https://github.com/rust-lang/cargo/pull/9846)
+- Improve resolver message to include dependency requirements.
+ [#9827](https://github.com/rust-lang/cargo/pull/9827)
+- `cargo fix` now has more debug logging available with the `CARGO_LOG`
+ environment variable.
+ [#9831](https://github.com/rust-lang/cargo/pull/9831)
+- Changed `cargo fix --edition` to emit a warning when on the latest stable
+ edition when running on stable instead of generating an error.
+ [#9792](https://github.com/rust-lang/cargo/pull/9792)
+- `cargo install` will now determine all of the packages to install before
+ starting the installation, which should help with reporting errors without
+ partially installing.
+ [#9793](https://github.com/rust-lang/cargo/pull/9793)
+- The resolver report for `cargo fix --edition` now includes differences for
+ dev-dependencies.
+ [#9803](https://github.com/rust-lang/cargo/pull/9803)
+- `cargo fix` will now show better diagnostics for abnormal errors from `rustc`.
+ [#9799](https://github.com/rust-lang/cargo/pull/9799)
+- Entries in `cargo --list` are now deduplicated.
+ [#9773](https://github.com/rust-lang/cargo/pull/9773)
+- Aliases are now included in `cargo --list`.
+ [#9764](https://github.com/rust-lang/cargo/pull/9764)
+
+### Fixed
+
+- Fixed panic with build-std of a proc-macro.
+ [#9834](https://github.com/rust-lang/cargo/pull/9834)
+- Fixed running `cargo` recursively from proc-macros while running `cargo fix`.
+ [#9818](https://github.com/rust-lang/cargo/pull/9818)
+- Return an error instead of a stack overflow for command alias loops.
+ [#9791](https://github.com/rust-lang/cargo/pull/9791)
+- Updated to curl 7.79.1, which will hopefully fix intermittent http2 errors.
+ [#9937](https://github.com/rust-lang/cargo/pull/9937)
+
+### Nightly only
+
+- Added `[future-incompat-report]` config section.
+ [#9774](https://github.com/rust-lang/cargo/pull/9774)
+- Fixed value-after-table error with custom named profiles.
+ [#9789](https://github.com/rust-lang/cargo/pull/9789)
+- Added the `different-binary-name` feature to support specifying a
+ non-rust-identifier for a binary name.
+ [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#different-binary-name)
+ [#9627](https://github.com/rust-lang/cargo/pull/9627)
+- Added a profile option to select the codegen backend.
+ [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#codegen-backend)
+ [#9118](https://github.com/rust-lang/cargo/pull/9118)
+
+
+## Cargo 1.55 (2021-09-09)
+[aa8b0929...rust-1.55.0](https://github.com/rust-lang/cargo/compare/aa8b0929...rust-1.55.0)
+
+### Added
+
+- The package definition in `cargo metadata` now includes the `"default_run"`
+ field from the manifest.
+ [#9550](https://github.com/rust-lang/cargo/pull/9550)
+- ❗ Build scripts now have access to the following environment variables:
+ `RUSTC_WRAPPER`, `RUSTC_WORKSPACE_WRAPPER`, `CARGO_ENCODED_RUSTFLAGS`.
+ `RUSTFLAGS` is no longer set for build scripts; they should use
+ `CARGO_ENCODED_RUSTFLAGS` instead.
+ [docs](https://doc.rust-lang.org/nightly/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts)
+ [#9601](https://github.com/rust-lang/cargo/pull/9601)
+- Added `cargo d` as an alias for `cargo doc`.
+ [#9680](https://github.com/rust-lang/cargo/pull/9680)
+- Added `{lib}` to the `cargo tree --format` option to display the library
+ name of a package.
+ [#9663](https://github.com/rust-lang/cargo/pull/9663)
+- Added `members_mut` method to the `Workspace` API.
+ [#9547](https://github.com/rust-lang/cargo/pull/9547)
+
+### Changed
+
+- If a build command does not match any targets when using the
+ `--all-targets`, `--bins`, `--tests`, `--examples`, or `--benches` flags, a
+ warning is now displayed to inform you that there were no matching targets.
+ [#9549](https://github.com/rust-lang/cargo/pull/9549)
+- The way `cargo init` detects whether or not existing source files represent
+ a binary or library has been changed to respect the command-line flags
+ instead of trying to guess which type it is.
+ [#9522](https://github.com/rust-lang/cargo/pull/9522)
+- Registry names are now displayed instead of registry URLs when possible.
+ [#9632](https://github.com/rust-lang/cargo/pull/9632)
+- Duplicate compiler diagnostics are no longer shown. This can often happen
+ with `cargo test` which builds multiple copies of the same code in parallel.
+ This also updates the warning summary to provide more context.
+ [#9675](https://github.com/rust-lang/cargo/pull/9675)
+- The output for warnings or errors is now improved to be leaner, cleaner, and
+ show more context.
+ [#9655](https://github.com/rust-lang/cargo/pull/9655)
+- Network send errors are now treated as "spurious" which means they will be retried.
+ [#9695](https://github.com/rust-lang/cargo/pull/9695)
+- Git keys (`branch`, `tag`, `rev`) on a non-git dependency are now an error.
+ Additionally, specifying both `git` and `path` is now an error.
+ [#9689](https://github.com/rust-lang/cargo/pull/9689)
+- Specifying a dependency without any keys is now an error.
+ [#9686](https://github.com/rust-lang/cargo/pull/9686)
+- The resolver now prefers to use `[patch]` table entries of dependencies when
+ possible.
+ [#9639](https://github.com/rust-lang/cargo/pull/9639)
+- Package name typo errors in dependencies are now displayed aligned with the
+ original to help make it easier to see the difference.
+ [#9665](https://github.com/rust-lang/cargo/pull/9665)
+- Windows platforms may now warn on environment variables that have the wrong case.
+ [#9654](https://github.com/rust-lang/cargo/pull/9654)
+- `features` used in a `[patch]` table now issues a warning, as they are ignored.
+ [#9666](https://github.com/rust-lang/cargo/pull/9666)
+- The `target` directory is now excluded from content indexing on Windows.
+ [#9635](https://github.com/rust-lang/cargo/pull/9635)
+- When `Cargo.toml` is not found, the error message now detects if it was
+ misnamed with a lowercase `c` to suggest the correct form.
+ [#9607](https://github.com/rust-lang/cargo/pull/9607)
+- Building `diesel` with the new resolver displays a compatibility notice.
+ [#9602](https://github.com/rust-lang/cargo/pull/9602)
+- Updated the `opener` dependency, which handles opening a web browser, which
+ includes several changes, such as new behavior when run on WSL, and using
+ the system `xdg-open` on Linux.
+ [#9583](https://github.com/rust-lang/cargo/pull/9583)
+- Updated to libcurl 7.78.
+ [#9809](https://github.com/rust-lang/cargo/pull/9809)
+ [#9810](https://github.com/rust-lang/cargo/pull/9810)
+
+### Fixed
+
+- Fixed dep-info files including non-local build script paths.
+ [#9596](https://github.com/rust-lang/cargo/pull/9596)
+- Handle "jobs = 0" case in cargo config files
+ [#9584](https://github.com/rust-lang/cargo/pull/9584)
+- Implement warning for ignored trailing arguments after `--`
+ [#9561](https://github.com/rust-lang/cargo/pull/9561)
+- Fixed rustc/rustdoc config values to be config-relative.
+ [#9566](https://github.com/rust-lang/cargo/pull/9566)
+- `cargo fix` now supports rustc's suggestions with multiple spans.
+ [#9567](https://github.com/rust-lang/cargo/pull/9567)
+- `cargo fix` now fixes each target serially instead of in parallel to avoid
+ problems with fixing the same file concurrently.
+ [#9677](https://github.com/rust-lang/cargo/pull/9677)
+- Changes to the target `linker` config value now trigger a rebuild.
+ [#9647](https://github.com/rust-lang/cargo/pull/9647)
+- Git unstaged deleted files are now ignored when using the `--allow-dirty`
+ flag with `cargo publish` or `cargo package`.
+ [#9645](https://github.com/rust-lang/cargo/pull/9645)
+
+### Nightly only
+
+- Enabled support for `cargo fix --edition` for 2021.
+ [#9588](https://github.com/rust-lang/cargo/pull/9588)
+- Several changes to named profiles.
+ [#9685](https://github.com/rust-lang/cargo/pull/9685)
+- Extended instructions on what to do when running `cargo fix --edition` on
+ the 2021 edition.
+ [#9694](https://github.com/rust-lang/cargo/pull/9694)
+- Multiple updates to error messages using nightly features to help better
+ explain the situation.
+ [#9657](https://github.com/rust-lang/cargo/pull/9657)
+- Adjusted the edition 2021 resolver diff report.
+ [#9649](https://github.com/rust-lang/cargo/pull/9649)
+- Fixed error using `cargo doc --open` with `doc.extern-map`.
+ [#9531](https://github.com/rust-lang/cargo/pull/9531)
+- Unified weak and namespaced features.
+ [#9574](https://github.com/rust-lang/cargo/pull/9574)
+- Various updates to future-incompatible reporting.
+ [#9606](https://github.com/rust-lang/cargo/pull/9606)
+- `[env]` environment variables are not allowed to set vars set by Cargo.
+ [#9579](https://github.com/rust-lang/cargo/pull/9579)
+
+## Cargo 1.54 (2021-07-29)
+[4369396c...rust-1.54.0](https://github.com/rust-lang/cargo/compare/4369396c...rust-1.54.0)
### Added
+- Fetching from a git repository (such as the crates.io index) now displays
+ the network transfer rate.
+ [#9395](https://github.com/rust-lang/cargo/pull/9395)
+- Added `--prune` option for `cargo tree` to limit what is displayed.
+ [#9520](https://github.com/rust-lang/cargo/pull/9520)
+- Added `--depth` option for `cargo tree` to limit what is displayed.
+ [#9499](https://github.com/rust-lang/cargo/pull/9499)
+- Added `cargo tree -e no-proc-macro` to hide procedural macro dependencies.
+ [#9488](https://github.com/rust-lang/cargo/pull/9488)
+- Added `doc.browser` config option to set which browser to open with `cargo doc --open`.
+ [#9473](https://github.com/rust-lang/cargo/pull/9473)
+- Added `CARGO_TARGET_TMPDIR` environment variable set for integration tests &
+ benches. This provides a temporary or "scratch" directory in the `target`
+ directory for tests and benches to use.
+ [#9375](https://github.com/rust-lang/cargo/pull/9375)
+
### Changed
+- `--features` CLI flags now provide typo suggestions with the new feature resolver.
+ [#9420](https://github.com/rust-lang/cargo/pull/9420)
+- Cargo now uses a new parser for SemVer versions. This should behave mostly
+ the same as before with some minor exceptions where invalid syntax for
+ version requirements is now rejected.
+ [#9508](https://github.com/rust-lang/cargo/pull/9508)
+- Mtime handling of `.crate` published packages has changed slightly to avoid
+ mtime values of 0. This was causing problems with lldb which refused to read
+ those files.
+ [#9517](https://github.com/rust-lang/cargo/pull/9517)
+- Improved performance of git status check in `cargo package`.
+ [#9478](https://github.com/rust-lang/cargo/pull/9478)
+- `cargo new` with fossil now places the ignore settings in the new repository
+ instead of using `fossil settings` to set them globally. This also includes
+ several other cleanups to make it more consistent with other VCS
+ configurations.
+ [#9469](https://github.com/rust-lang/cargo/pull/9469)
+- `rustc-cdylib-link-arg` applying transitively displays a warning that this
+ was not intended, and may be an error in the future.
+ [#9563](https://github.com/rust-lang/cargo/pull/9563)
+
+### Fixed
+
+- Fixed `package.exclude` in `Cargo.toml` using inverted exclusions
+ (`!somefile`) when not in a git repository or when vendoring a dependency.
+ [#9186](https://github.com/rust-lang/cargo/pull/9186)
+- Dep-info files now adjust build script `rerun-if-changed` paths to be
+ absolute paths.
+ [#9421](https://github.com/rust-lang/cargo/pull/9421)
+- Fixed a bug when with resolver = "1" non-virtual package was allowing
+ unknown features.
+ [#9437](https://github.com/rust-lang/cargo/pull/9437)
+- Fixed an issue with the index cache mishandling versions that only
+ differed in build metadata (such as `110.0.0` and `110.0.0+1.1.0f`).
+ [#9476](https://github.com/rust-lang/cargo/pull/9476)
+- Fixed `cargo install` with a semver metadata version.
+ [#9467](https://github.com/rust-lang/cargo/pull/9467)
+
+### Nightly only
+
+- Added `report` subcommand, and changed `cargo
+ describe-future-incompatibilitie` to `cargo report
+ future-incompatibilities`.
+ [#9438](https://github.com/rust-lang/cargo/pull/9438)
+- Added a `[host]` table to the config files to be able to set build flags for
+ host target. Also added `target-applies-to-host` to control how the
+ `[target]` tables behave.
+ [#9322](https://github.com/rust-lang/cargo/pull/9322)
+- Added some validation to build script `rustc-link-arg-*` instructions to
+ return an error if the target doesn't exist.
+ [#9523](https://github.com/rust-lang/cargo/pull/9523)
+- Added `cargo:rustc-link-arg-bin` instruction for build scripts.
+ [#9486](https://github.com/rust-lang/cargo/pull/9486)
+
+
+## Cargo 1.53 (2021-06-17)
+[90691f2b...rust-1.53.0](https://github.com/rust-lang/cargo/compare/90691f2b...rust-1.53.0)
+
+### Added
+
+### Changed
- 🔥 Cargo now supports git repositories where the default `HEAD` branch is not
"master". This also includes a switch to the version 3 `Cargo.lock` format
which can handle default branches correctly.
[#9133](https://github.com/rust-lang/cargo/pull/9133)
-- 🔥 macOS targets now default to `unpacked` debuginfo.
+ [#9397](https://github.com/rust-lang/cargo/pull/9397)
+ [#9384](https://github.com/rust-lang/cargo/pull/9384)
+ [#9392](https://github.com/rust-lang/cargo/pull/9392)
+- 🔥 macOS targets now default to `unpacked` split-debuginfo.
[#9298](https://github.com/rust-lang/cargo/pull/9298)
- ❗ The `authors` field is no longer included in `Cargo.toml` for new
projects.
different toolchain versions. There are shared, unversioned files (such as
the search index) that can become broken when using different versions.
[#8640](https://github.com/rust-lang/cargo/pull/8640)
+ [#9404](https://github.com/rust-lang/cargo/pull/9404)
+- Improved error messages when path dependency/workspace member is missing.
+ [#9368](https://github.com/rust-lang/cargo/pull/9368)
### Fixed
+- Fixed `cargo doc` detecting if the documentation needs to be rebuilt when
+ changing some settings such as features.
+ [#9419](https://github.com/rust-lang/cargo/pull/9419)
+- `cargo doc` now deletes the output directory for the package before running
+ rustdoc to clear out any stale files.
+ [#9419](https://github.com/rust-lang/cargo/pull/9419)
+- Fixed the `-C metadata` value to always include all information for all
+ builds. Previously, in some situations, the hash only included the package
+ name and version. This fixes some issues, such as incremental builds with
+ split-debuginfo on macOS corrupting the incremental cache in some cases.
+ [#9418](https://github.com/rust-lang/cargo/pull/9418)
+- Fixed man pages not working on Windows if `man` is in `PATH`.
+ [#9378](https://github.com/rust-lang/cargo/pull/9378)
+- The `rustc` cache is now aware of `RUSTC_WRAPPER` and `RUSTC_WORKSPACE_WRAPPER`.
+ [#9348](https://github.com/rust-lang/cargo/pull/9348)
+- Track the `CARGO` environment variable in the rebuild fingerprint if the
+ code uses `env!("CARGO")`.
+ [#9363](https://github.com/rust-lang/cargo/pull/9363)
### Nightly only
- Fixed config includes not working.
- Emit note when `--future-incompat-report` had nothing to report.
[#9263](https://github.com/rust-lang/cargo/pull/9263)
- Error messages for nightly features flags (like `-Z` and `cargo-features`)
- should now provide more information.
+ now provides more information.
[#9290](https://github.com/rust-lang/cargo/pull/9290)
+- Added the ability to set the target for an individual package in `Cargo.toml`.
+ [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#per-package-target)
+ [#9030](https://github.com/rust-lang/cargo/pull/9030)
+- Fixed build-std updating the index on every build.
+ [#9393](https://github.com/rust-lang/cargo/pull/9393)
+- `-Z help` now displays all the `-Z` options.
+ [#9369](https://github.com/rust-lang/cargo/pull/9369)
+- Added `-Zallow-features` to specify which nightly features are allowed to be used.
+ [#9283](https://github.com/rust-lang/cargo/pull/9283)
+- Added `cargo config` subcommand.
+ [#9302](https://github.com/rust-lang/cargo/pull/9302)
## Cargo 1.52 (2021-05-06)
[34170fcd...rust-1.52.0](https://github.com/rust-lang/cargo/compare/34170fcd...rust-1.52.0)