From 8cf06a68e319d2473a11cfa3324462d45771eb69 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Fri, 16 Feb 2024 13:50:41 -0500 Subject: [PATCH 1/4] [beta-1.77] chore: update jobserver to 0.1.28 See rust-lang/rust 120515 and 120846 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 22b747ed895..d70a6b4fb93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2015,9 +2015,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" dependencies = [ "libc", ] diff --git a/Cargo.toml b/Cargo.toml index c985adae97c..1d7cc8509b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,7 +59,7 @@ ignore = "0.4.21" im-rc = "15.1.0" indexmap = "2" itertools = "0.12.0" -jobserver = "0.1.27" +jobserver = "0.1.28" lazycell = "1.3.0" libc = "0.2.151" libgit2-sys = "0.16.2" From 0f90c393deacf7bb724f05a3e119585068060c34 Mon Sep 17 00:00:00 2001 From: bors Date: Thu, 15 Feb 2024 17:46:50 +0000 Subject: [PATCH 2/4] Auto merge of #13444 - ehuss:fix-custom-target, r=epage Update tests for changes in latest nightly There were two changes that has caused nightly tests to start failing: * LLVM was updated, and that caused a change in the expected data layout for the target. (https://github.com/rust-lang/rust/pull/120055 update to LLVM 18) * https://github.com/rust-lang/rust/pull/121049 Do not point at `#[allow(_)]` as the reason for compat lint triggering. The test was looking for the `unused_variables` note, which is no longer printed. --- tests/build-std/main.rs | 4 ++-- tests/testsuite/custom_target.rs | 2 +- tests/testsuite/future_incompat_report.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/build-std/main.rs b/tests/build-std/main.rs index c9d5c3d983d..b3b41a25841 100644 --- a/tests/build-std/main.rs +++ b/tests/build-std/main.rs @@ -155,7 +155,7 @@ fn cross_custom() { r#" { "llvm-target": "x86_64-unknown-none-gnu", - "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", + "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", "arch": "x86_64", "target-endian": "little", "target-pointer-width": "64", @@ -196,7 +196,7 @@ fn custom_test_framework() { r#" { "llvm-target": "x86_64-unknown-none-gnu", - "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", + "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", "arch": "x86_64", "target-endian": "little", "target-pointer-width": "64", diff --git a/tests/testsuite/custom_target.rs b/tests/testsuite/custom_target.rs index 69325d0099f..6109e8c1b30 100644 --- a/tests/testsuite/custom_target.rs +++ b/tests/testsuite/custom_target.rs @@ -22,7 +22,7 @@ pub trait Copy { const SIMPLE_SPEC: &str = r#" { "llvm-target": "x86_64-unknown-none-gnu", - "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", + "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", "arch": "x86_64", "target-endian": "little", "target-pointer-width": "64", diff --git a/tests/testsuite/future_incompat_report.rs b/tests/testsuite/future_incompat_report.rs index c52bf25a9e1..131b5829eff 100644 --- a/tests/testsuite/future_incompat_report.rs +++ b/tests/testsuite/future_incompat_report.rs @@ -15,7 +15,7 @@ use cargo_test_support::{basic_manifest, project, Project}; // We use a special flag to force it to generate a report. const FUTURE_EXAMPLE: &'static str = "fn main() { let x = 1; }"; // Some text that will be displayed when the lint fires. -const FUTURE_OUTPUT: &'static str = "[..]unused_variables[..]"; +const FUTURE_OUTPUT: &'static str = "[..]unused variable[..]"; fn simple_project() -> Project { project() From 5b527d81360014dca5c4cc705c1b979f460de7e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Thu, 1 Feb 2024 03:47:27 +0000 Subject: [PATCH 3/4] Change tests to support changes to suggestion `rustc` will start marking the suggestions for prefacing unused bindings with underscores as "maybe incorrect", which makes them no longer auto applicable by `rustfix`. Change done at https://github.com/rust-lang/rust/pull/120470. --- tests/testsuite/fix.rs | 1 + tests/testsuite/messages.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/testsuite/fix.rs b/tests/testsuite/fix.rs index 87b23b89063..7b1a5d12fc9 100644 --- a/tests/testsuite/fix.rs +++ b/tests/testsuite/fix.rs @@ -1502,6 +1502,7 @@ fn fix_shared_cross_workspace() { // [FIXED] bar/src/../../foo/src/shared.rs (2 fixes) // [FIXED] foo/src/shared.rs (2 fixes) p.cargo("fix --allow-no-vcs") + .env("__CARGO_FIX_YOLO", "1") .with_stderr_unordered( "\ [CHECKING] foo v0.1.0 [..] diff --git a/tests/testsuite/messages.rs b/tests/testsuite/messages.rs index fb92593bccb..604d77d3268 100644 --- a/tests/testsuite/messages.rs +++ b/tests/testsuite/messages.rs @@ -60,7 +60,7 @@ fn deduplicate_messages_basic() { let rustc_message = raw_rustc_output(&p, "src/lib.rs", &[]); let expected_output = format!( "{}\ -warning: `foo` (lib) generated 1 warning (run `cargo fix --lib -p foo` to apply 1 suggestion) +warning: `foo` (lib) generated 1 warning[..] warning: `foo` (lib test) generated 1 warning (1 duplicate) [FINISHED] [..] [EXECUTABLE] unittests src/lib.rs (target/debug/deps/foo-[..][EXE]) @@ -103,7 +103,7 @@ fn deduplicate_messages_mismatched_warnings() { let expected_output = format!( "\ {}\ -warning: `foo` (lib) generated 1 warning (run `cargo fix --lib -p foo` to apply 1 suggestion) +warning: `foo` (lib) generated 1 warning[..] {}\ warning: `foo` (lib test) generated 2 warnings (1 duplicate) [FINISHED] [..] From b8f17eaca15ab97d01de0e2aeae69851f441ba61 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 7 Feb 2024 13:52:38 +0000 Subject: [PATCH 4/4] Relax a test to permit warnings to be emitted, too. This change is necessary to allow rustc to actually start emitting the warning about the unused `mut` --- tests/testsuite/fix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testsuite/fix.rs b/tests/testsuite/fix.rs index 7b1a5d12fc9..05493960cad 100644 --- a/tests/testsuite/fix.rs +++ b/tests/testsuite/fix.rs @@ -29,7 +29,7 @@ fn do_not_fix_broken_builds() { p.cargo("fix --allow-no-vcs") .env("__CARGO_FIX_YOLO", "1") .with_status(101) - .with_stderr_contains("[ERROR] could not compile `foo` (lib) due to 1 previous error") + .with_stderr_contains("[ERROR] could not compile `foo` (lib) due to 1 previous error[..]") .run(); assert!(p.read_file("src/lib.rs").contains("let mut x = 3;")); }