# Changelog
-## Cargo 1.52 (2021-05-06)
-[34170fcd...HEAD](https://github.com/rust-lang/cargo/compare/34170fcd...HEAD)
+## Cargo 1.56 (2021-10-21)
+[cebef295...HEAD](https://github.com/rust-lang/cargo/compare/cebef295...HEAD)
+
+### Added
+
+- Added support for the [`rust-version`](https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field)
+ field in a crate's metadata and the `--ignore-rust-version` command line option.
+- 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)
+
+### 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)
+
+### Fixed
+
+### Nightly only
+
+
+## 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`.
+ [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)
+
+### 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
"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)
+ [#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.
+ [#9282](https://github.com/rust-lang/cargo/pull/9282)
+- `cargo update` may now work with the `--offline` flag.
+ [#9279](https://github.com/rust-lang/cargo/pull/9279)
+- `cargo doc` will now erase the `doc` directory when switching between
+ 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.
+ [#9299](https://github.com/rust-lang/cargo/pull/9299)
+- 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`)
+ 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)
+
+### Added
+- Added the `"manifest_path"` field to JSON messages for a package.
+ [#9022](https://github.com/rust-lang/cargo/pull/9022)
+ [#9247](https://github.com/rust-lang/cargo/pull/9247)
+
+### Changed
+- Build scripts are now forbidden from setting `RUSTC_BOOTSTRAP` on stable.
+ [#9181](https://github.com/rust-lang/cargo/pull/9181)
+ [#9385](https://github.com/rust-lang/cargo/pull/9385)
+- crates.io now supports SPDX 3.11 licenses.
+ [#9209](https://github.com/rust-lang/cargo/pull/9209)
+- An error is now reported if `CARGO_TARGET_DIR` is an empty string.
+ [#8939](https://github.com/rust-lang/cargo/pull/8939)
+- Doc tests now pass the `--message-format` flag into the test so that the
+ "short" format can now be used for doc tests.
+ [#9128](https://github.com/rust-lang/cargo/pull/9128)
+- `cargo test` now prints a clearer indicator of which target is currently running.
+ [#9195](https://github.com/rust-lang/cargo/pull/9195)
+- The `CARGO_TARGET_<TRIPLE>` environment variable will now issue a warning if
+ it is using lowercase letters.
+ [#9169](https://github.com/rust-lang/cargo/pull/9169)
### Fixed
+- Fixed publication of packages with metadata and resolver fields in `Cargo.toml`.
+ [#9300](https://github.com/rust-lang/cargo/pull/9300)
+ [#9304](https://github.com/rust-lang/cargo/pull/9304)
+- Fixed logic for determining prefer-dynamic for a dylib which differed in a
+ workspace vs a single package.
+ [#9252](https://github.com/rust-lang/cargo/pull/9252)
+- Fixed an issue where exclusive target-specific dependencies that overlapped
+ across dependency kinds (like regular and build-dependencies) would
+ incorrectly include the dependencies in both.
+ [#9255](https://github.com/rust-lang/cargo/pull/9255)
+- Fixed panic with certain styles of Package IDs when passed to the `-p` flag.
+ [#9188](https://github.com/rust-lang/cargo/pull/9188)
+- When running cargo with output not going to a TTY, and with the progress bar
+ and color force-enabled, the output will now correctly clear the progress
+ line.
+ [#9231](https://github.com/rust-lang/cargo/pull/9231)
+- Error instead of panic when JSON may contain non-utf8 paths.
+ [#9226](https://github.com/rust-lang/cargo/pull/9226)
+- Fixed a hang that can happen on broken stderr.
+ [#9201](https://github.com/rust-lang/cargo/pull/9201)
+- Fixed thin-local LTO not being disabled correctly when `lto=off` is set.
+ [#9182](https://github.com/rust-lang/cargo/pull/9182)
### Nightly only
- The `strip` profile option now supports `true` and `false` values.
[#9153](https://github.com/rust-lang/cargo/pull/9153)
+- `cargo fix --edition` now displays a report when switching to 2021 if the
+ new resolver changes features.
+ [#9268](https://github.com/rust-lang/cargo/pull/9268)
+- Added `[patch]` table support in `.cargo/config` files.
+ [#9204](https://github.com/rust-lang/cargo/pull/9204)
+- Added `cargo describe-future-incompatibilities` for generating a report on
+ dependencies that contain future-incompatible warnings.
+ [#8825](https://github.com/rust-lang/cargo/pull/8825)
+- Added easier support for testing the 2021 edition.
+ [#9184](https://github.com/rust-lang/cargo/pull/9184)
+- Switch the default resolver to "2" in the 2021 edition.
+ [#9184](https://github.com/rust-lang/cargo/pull/9184)
+- `cargo fix --edition` now supports 2021.
+ [#9184](https://github.com/rust-lang/cargo/pull/9184)
+- Added `--print` flag to `cargo rustc` to pass along to `rustc` to display
+ information from rustc.
+ [#9002](https://github.com/rust-lang/cargo/pull/9002)
+- Added `-Zdoctest-in-workspace` for changing the directory where doctests are
+ *run* versus where they are *compiled*.
+ [#9105](https://github.com/rust-lang/cargo/pull/9105)
+- Added support for an `[env]` section in `.cargo/config.toml` to set
+ environment variables when running cargo.
+ [#9175](https://github.com/rust-lang/cargo/pull/9175)
+- Added a schema field and `features2` field to the index.
+ [#9161](https://github.com/rust-lang/cargo/pull/9161)
+- Changes to JSON spec targets will now trigger a rebuild.
+ [#9223](https://github.com/rust-lang/cargo/pull/9223)
## Cargo 1.51 (2021-03-25)
[75d5d8cf...rust-1.51.0](https://github.com/rust-lang/cargo/compare/75d5d8cf...rust-1.51.0)
[#9059](https://github.com/rust-lang/cargo/pull/9059)
- Fixed to use `http.proxy` setting in `~/.gitconfig`.
[#8986](https://github.com/rust-lang/cargo/pull/8986)
+- Fixed --feature pkg/feat for V1 resolver for non-member.
+ [#9275](https://github.com/rust-lang/cargo/pull/9275)
+ [#9277](https://github.com/rust-lang/cargo/pull/9277)
+- Fixed panic in `cargo doc` when there are colliding output filenames in a workspace.
+ [#9276](https://github.com/rust-lang/cargo/pull/9276)
+ [#9277](https://github.com/rust-lang/cargo/pull/9277)
+- Fixed `cargo install` from exiting with success if one of several packages
+ did not install successfully.
+ [#9185](https://github.com/rust-lang/cargo/pull/9185)
+ [#9196](https://github.com/rust-lang/cargo/pull/9196)
+- Fix panic with doc collision orphan.
+ [#9142](https://github.com/rust-lang/cargo/pull/9142)
+ [#9196](https://github.com/rust-lang/cargo/pull/9196)
### Nightly only
- Removed the `publish-lockfile` unstable feature, it was stabilized without
[#8922](https://github.com/rust-lang/cargo/pull/8922)
- Added support for the `rust-version` field in project metadata.
[#8037](https://github.com/rust-lang/cargo/pull/8037)
+- Added a schema field to the index.
+ [#9161](https://github.com/rust-lang/cargo/pull/9161)
+ [#9196](https://github.com/rust-lang/cargo/pull/9196)
## Cargo 1.50 (2021-02-11)
[8662ab42...rust-1.50.0](https://github.com/rust-lang/cargo/compare/8662ab42...rust-1.50.0)