Skip to content

Commit 50a0af4

Browse files
committed
Auto merge of #9998 - ehuss:version-bump, r=alexcrichton
Bump to 0.59.0, update changelog
2 parents 7fbbf4e + 333ee58 commit 50a0af4

File tree

6 files changed

+63
-47
lines changed

6 files changed

+63
-47
lines changed

CHANGELOG.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,76 @@
11
# Changelog
22

3+
## Cargo 1.58 (2022-01-13)
4+
[b2e52d7c...HEAD](https://github.com/rust-lang/cargo/compare/b2e52d7c...HEAD)
5+
6+
### Added
7+
8+
- Added `rust_version` field to package data in `cargo metadata`.
9+
[#9967](https://github.com/rust-lang/cargo/pull/9967)
10+
11+
### Changed
12+
13+
### Fixed
14+
15+
- Doctests now include rustc-link-args from build scripts.
16+
[#9916](https://github.com/rust-lang/cargo/pull/9916)
17+
18+
### Nightly only
19+
20+
- Make future-incompat-report output more user-friendly.
21+
[#9953](https://github.com/rust-lang/cargo/pull/9953)
22+
323
## Cargo 1.57 (2021-12-02)
4-
[18751dd3...HEAD](https://github.com/rust-lang/cargo/compare/18751dd3...HEAD)
24+
[18751dd3...rust-1.57.0](https://github.com/rust-lang/cargo/compare/18751dd3...rust-1.57.0)
525

626
### Added
727

28+
- 🎉 Added custom named profiles. This also changes the `test` and `bench`
29+
profiles to inherit their settings from `dev` and `release`, and Cargo will
30+
now only use a single profile during a given command instead of using
31+
different profiles for dependencies and cargo-targets.
32+
[docs](https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#custom-profiles)
33+
[#9943](https://github.com/rust-lang/cargo/pull/9943)
834
- The `rev` option for a git dependency now supports git references that start
935
with `refs/`. An example where this can be used is to depend on a pull
1036
request from a service like GitHub before it is merged.
1137
[#9859](https://github.com/rust-lang/cargo/pull/9859)
38+
- Added `path_in_vcs` field to the `.cargo_vcs_info.json` file.
39+
[docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-package.html#cargo_vcs_infojson-format)
40+
[#9866](https://github.com/rust-lang/cargo/pull/9866)
1241

1342
### Changed
1443

44+
- The `cargo version` command now includes some extra information.
45+
[#9968](https://github.com/rust-lang/cargo/pull/9968)
46+
- Updated libgit2 to 1.3 which brings in a number of fixes and changes to git
47+
handling.
48+
[#9963](https://github.com/rust-lang/cargo/pull/9963)
49+
[#9988](https://github.com/rust-lang/cargo/pull/9988)
50+
- Shell completions now include shorthand b/r/c/d subcommands.
51+
[#9951](https://github.com/rust-lang/cargo/pull/9951)
52+
- `cargo update --precise` now allows specifying a version without semver
53+
metadata (stuff after `+` in the version number).
54+
[#9945](https://github.com/rust-lang/cargo/pull/9945)
55+
- zsh completions now complete `--example` names.
56+
[#9939](https://github.com/rust-lang/cargo/pull/9939)
57+
- The progress bar now differentiates when building unittests.
58+
[#9934](https://github.com/rust-lang/cargo/pull/9934)
59+
- Some backwards-compatibility support for invalid TOML syntax has been removed.
60+
[#9932](https://github.com/rust-lang/cargo/pull/9932)
61+
- Reverted the change from 1.55 that triggered an error for dependency
62+
specifications that did not include any fields.
63+
[#9911](https://github.com/rust-lang/cargo/pull/9911)
64+
1565
### Fixed
1666

1767
- Removed a log message (from `CARGO_LOG`) that may leak tokens.
1868
[#9873](https://github.com/rust-lang/cargo/pull/9873)
69+
- `cargo fix` will now avoid writing fixes to the global registry cache.
70+
[#9938](https://github.com/rust-lang/cargo/pull/9938)
71+
- Fixed `-Z help` CLI option when used with a shorthand alias (b/c/r/d).
72+
[#9933](https://github.com/rust-lang/cargo/pull/9933)
73+
1974

2075
### Nightly only
2176

@@ -105,6 +160,8 @@
105160
[#9818](https://github.com/rust-lang/cargo/pull/9818)
106161
- Return an error instead of a stack overflow for command alias loops.
107162
[#9791](https://github.com/rust-lang/cargo/pull/9791)
163+
- Updated to curl 7.79.1, which will hopefully fix intermittent http2 errors.
164+
[#9937](https://github.com/rust-lang/cargo/pull/9937)
108165

109166
### Nightly only
110167

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cargo"
3-
version = "0.58.0"
3+
version = "0.59.0"
44
edition = "2018"
55
authors = ["Yehuda Katz <[email protected]>",
66
"Carl Lerche <[email protected]>",

src/cargo/core/compiler/build_context/target_info.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ pub struct TargetInfo {
4747
pub rustdocflags: Vec<String>,
4848
/// Whether or not rustc supports the `-Csplit-debuginfo` flag.
4949
pub supports_split_debuginfo: bool,
50-
/// Whether or not rustc supports the `--force-warn` flag. Remove after 1.56 is stable.
51-
pub supports_force_warn: bool,
5250
}
5351

5452
/// Kind of each file generated by a Unit, part of `FileType`.
@@ -180,12 +178,6 @@ impl TargetInfo {
180178
extra_fingerprint,
181179
)
182180
.is_ok();
183-
let supports_force_warn = rustc
184-
.cached_output(
185-
process.clone().arg("--force-warn=rust-2021-compatibility"),
186-
extra_fingerprint,
187-
)
188-
.is_ok();
189181

190182
process.arg("--print=sysroot");
191183
process.arg("--print=cfg");
@@ -261,7 +253,6 @@ impl TargetInfo {
261253
)?,
262254
cfg,
263255
supports_split_debuginfo,
264-
supports_force_warn,
265256
})
266257
}
267258

src/cargo/ops/fix.rs

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ use rustfix::diagnostics::Diagnostic;
5252
use rustfix::{self, CodeFix};
5353
use semver::Version;
5454

55-
use crate::core::compiler::{CompileKind, RustcTargetData, TargetInfo};
55+
use crate::core::compiler::RustcTargetData;
5656
use crate::core::resolver::features::{DiffMap, FeatureOpts, FeatureResolver};
5757
use crate::core::resolver::{HasDevUnits, Resolve, ResolveBehavior};
5858
use crate::core::{Edition, MaybePackage, PackageId, Workspace};
@@ -68,7 +68,6 @@ const FIX_ENV: &str = "__CARGO_FIX_PLZ";
6868
const BROKEN_CODE_ENV: &str = "__CARGO_FIX_BROKEN_CODE";
6969
const EDITION_ENV: &str = "__CARGO_FIX_EDITION";
7070
const IDIOMS_ENV: &str = "__CARGO_FIX_IDIOMS";
71-
const SUPPORTS_FORCE_WARN: &str = "__CARGO_SUPPORTS_FORCE_WARN";
7271

7372
pub struct FixOptions {
7473
pub edition: bool,
@@ -124,17 +123,6 @@ pub fn fix(ws: &Workspace<'_>, opts: &mut FixOptions) -> CargoResult<()> {
124123
let rustc = ws.config().load_global_rustc(Some(ws))?;
125124
wrapper.arg(&rustc.path);
126125

127-
// Remove this once 1.56 is stabilized.
128-
let target_info = TargetInfo::new(
129-
ws.config(),
130-
&opts.compile_opts.build_config.requested_kinds,
131-
&rustc,
132-
CompileKind::Host,
133-
)?;
134-
if target_info.supports_force_warn {
135-
wrapper.env(SUPPORTS_FORCE_WARN, "1");
136-
}
137-
138126
// primary crates are compiled using a cargo subprocess to do extra work of applying fixes and
139127
// repeating build until there are no more changes to be applied
140128
opts.compile_opts.build_config.primary_unit_rustc = Some(wrapper);
@@ -849,7 +837,7 @@ impl FixArgs {
849837
fn apply(&self, cmd: &mut Command) {
850838
cmd.arg(&self.file);
851839
cmd.args(&self.other);
852-
if self.prepare_for_edition.is_some() && env::var_os(SUPPORTS_FORCE_WARN).is_some() {
840+
if self.prepare_for_edition.is_some() {
853841
// When migrating an edition, we don't want to fix other lints as
854842
// they can sometimes add suggestions that fail to apply, causing
855843
// the entire migration to fail. But those lints aren't needed to
@@ -868,12 +856,8 @@ impl FixArgs {
868856

869857
if let Some(edition) = self.prepare_for_edition {
870858
if edition.supports_compat_lint() {
871-
if env::var_os(SUPPORTS_FORCE_WARN).is_some() {
872-
cmd.arg("--force-warn")
873-
.arg(format!("rust-{}-compatibility", edition));
874-
} else {
875-
cmd.arg("-W").arg(format!("rust-{}-compatibility", edition));
876-
}
859+
cmd.arg("--force-warn")
860+
.arg(format!("rust-{}-compatibility", edition));
877861
}
878862
}
879863
}

tests/testsuite/fix.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -950,10 +950,6 @@ fn prepare_for_already_on_latest_unstable() {
950950
#[cargo_test]
951951
fn prepare_for_already_on_latest_stable() {
952952
// Stable counterpart of prepare_for_already_on_latest_unstable.
953-
if !is_nightly() {
954-
// Remove once 1.56 is stabilized.
955-
return;
956-
}
957953
if Edition::LATEST_UNSTABLE.is_some() {
958954
eprintln!("This test cannot run while the latest edition is unstable, skipping.");
959955
return;
@@ -1528,10 +1524,6 @@ fn rustfix_handles_multi_spans() {
15281524
#[cargo_test]
15291525
fn fix_edition_2021() {
15301526
// Can migrate 2021, even when lints are allowed.
1531-
if !is_nightly() {
1532-
// Remove once 1.56 is stabilized.
1533-
return;
1534-
}
15351527
let p = project()
15361528
.file(
15371529
"Cargo.toml",
@@ -1748,10 +1740,6 @@ fn fix_with_run_cargo_in_proc_macros() {
17481740
#[cargo_test]
17491741
fn non_edition_lint_migration() {
17501742
// Migrating to a new edition where a non-edition lint causes problems.
1751-
if !is_nightly() {
1752-
// Remove once force-warn hits stable.
1753-
return;
1754-
}
17551743
let p = project()
17561744
.file("Cargo.toml", &basic_manifest("foo", "0.1.0"))
17571745
.file(

tests/testsuite/new.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,6 @@ fn new_with_reference_link() {
377377

378378
#[cargo_test]
379379
fn lockfile_constant_during_new() {
380-
if !cargo_test_support::is_nightly() {
381-
// Remove when 1.56 is stable (cargo new defaults to 2021).
382-
return;
383-
}
384380
cargo_process("new foo").run();
385381

386382
cargo_process("build").cwd(&paths::root().join("foo")).run();

0 commit comments

Comments
 (0)