From 524745d98423d05c1965a82e82bf084502eabce0 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 30 Jun 2022 14:29:03 -0700 Subject: [PATCH 1/3] Bump cargo-util version. --- Cargo.toml | 4 ++-- crates/cargo-util/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7851d0707..59e0a39f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo" -version = "0.63.0" +version = "0.63.1" edition = "2021" license = "MIT OR Apache-2.0" homepage = "https://crates.io" @@ -19,7 +19,7 @@ path = "src/cargo/lib.rs" atty = "0.2" bytesize = "1.0" cargo-platform = { path = "crates/cargo-platform", version = "0.1.2" } -cargo-util = { path = "crates/cargo-util", version = "0.1.3" } +cargo-util = { path = "crates/cargo-util", version = "0.2.0" } crates-io = { path = "crates/crates-io", version = "0.34.0" } crossbeam-utils = "0.8" curl = { version = "0.4.41", features = ["http2"] } diff --git a/crates/cargo-util/Cargo.toml b/crates/cargo-util/Cargo.toml index 86afbd0ee..bc83ccc7b 100644 --- a/crates/cargo-util/Cargo.toml +++ b/crates/cargo-util/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-util" -version = "0.1.3" +version = "0.2.0" edition = "2021" license = "MIT OR Apache-2.0" homepage = "https://github.com/rust-lang/cargo" From 6dedcf8d58a5135d9baa07d0bf24f735b3d53ced Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 30 Jun 2022 15:07:20 -0700 Subject: [PATCH 2/3] Ignore invalid_target_empty test. This is due to a change in clap 3.2. Cargo's CI runs without a lock file, but rust-lang/rust runs with one (locked to an older version). To avoid issues, this just ignores the test. See https://github.com/rust-lang/cargo/pull/10753 for more. --- tests/testsuite/cargo_add/invalid_target_empty/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testsuite/cargo_add/invalid_target_empty/mod.rs b/tests/testsuite/cargo_add/invalid_target_empty/mod.rs index 0815c7831..fb7f9a0da 100644 --- a/tests/testsuite/cargo_add/invalid_target_empty/mod.rs +++ b/tests/testsuite/cargo_add/invalid_target_empty/mod.rs @@ -6,6 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] +#[ignore] fn invalid_target_empty() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); From 20e282b98d9c1459e1fdffd7f450e7b9f6d8397f Mon Sep 17 00:00:00 2001 From: bors Date: Thu, 23 Jun 2022 20:12:03 +0000 Subject: [PATCH 3/3] Auto merge of #10785 - ehuss:fix-dead_code-diag, r=Eh2406 Fix tests due to change in dead_code diagnostic. https://github.com/rust-lang/rust/pull/97853 changed some diagnostics which is causing some tests to fail on the latest nightly. This updates the tests to work on both stable and nightly. --- tests/testsuite/build.rs | 4 ++-- tests/testsuite/registry.rs | 2 +- tests/testsuite/standard_lib.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index 68f8e905b..4af550679 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -647,7 +647,7 @@ fn cargo_compile_with_warnings_in_the_root_package() { .build(); p.cargo("build") - .with_stderr_contains("[..]function is never used: `dead`[..]") + .with_stderr_contains("[WARNING] [..]dead[..]") .run(); } @@ -686,7 +686,7 @@ fn cargo_compile_with_warnings_in_a_dep_package() { .build(); p.cargo("build") - .with_stderr_contains("[..]function is never used: `dead`[..]") + .with_stderr_contains("[WARNING] [..]dead[..]") .run(); assert!(p.bin("foo").is_file()); diff --git a/tests/testsuite/registry.rs b/tests/testsuite/registry.rs index f9afa2919..4ca028e15 100644 --- a/tests/testsuite/registry.rs +++ b/tests/testsuite/registry.rs @@ -1961,7 +1961,7 @@ fn upstream_warnings_on_extra_verbose(cargo: fn(&Project, &str) -> Execs) { .publish(); cargo(&p, "build -vv") - .with_stderr_contains("[..]warning: function is never used[..]") + .with_stderr_contains("[WARNING] [..]unused[..]") .run(); } diff --git a/tests/testsuite/standard_lib.rs b/tests/testsuite/standard_lib.rs index 07b038b4a..787c7e0c1 100644 --- a/tests/testsuite/standard_lib.rs +++ b/tests/testsuite/standard_lib.rs @@ -316,7 +316,7 @@ fn check_core() { p.cargo("check -v") .build_std_arg(&setup, "core") .target_host() - .with_stderr_contains("[WARNING] [..]unused_fn[..]`") + .with_stderr_contains("[WARNING] [..]unused_fn[..]") .run(); }