Skip to content

Commit 8811750

Browse files
committed
Bump to 0.59.0
1 parent 7fbbf4e commit 8811750

File tree

5 files changed

+5
-46
lines changed

5 files changed

+5
-46
lines changed

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 <wycats@gmail.com>",
66
"Carl Lerche <me@carllerche.com>",

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)