From ccbac1d143049977be108e686125d952cbe882fc Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Wed, 4 Mar 2026 20:28:59 +0000 Subject: [PATCH 1/3] test(replace): Mark a test as non-deterministic (#16700) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### What does this PR try to resolve? Blocks a compiler change, see [#t-cargo > `replace::use_a_spec_to_select` test failure @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/.60replace.3A.3Ause_a_spec_to_select.60.20test.20failure/near/577341461) ### How to test and review this PR? --- tests/testsuite/replace.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/testsuite/replace.rs b/tests/testsuite/replace.rs index 80c617bf6a8..4c62e598da2 100644 --- a/tests/testsuite/replace.rs +++ b/tests/testsuite/replace.rs @@ -469,7 +469,8 @@ fn use_a_spec_to_select() { .build(); p.cargo("check") - .with_stderr_data(str![[r#" + .with_stderr_data( + str![[r#" [UPDATING] `dummy-registry` index [UPDATING] git repository `[ROOTURL]/override` [LOCKING] 4 packages to latest compatible versions @@ -483,7 +484,9 @@ fn use_a_spec_to_select() { [CHECKING] foo v0.0.1 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s -"#]]) +"#]] + .unordered(), + ) .run(); } From ecf3c1fa81cfc57e9c447551504760c2a8078ecc Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Thu, 5 Mar 2026 15:11:25 +0000 Subject: [PATCH 2/3] test(git): Mark a test as non-deterministic (#16706) ### What does this PR try to resolve? Fixes #16704 ### How to test and review this PR? --- tests/testsuite/git.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/testsuite/git.rs b/tests/testsuite/git.rs index 82ef654c213..43698039533 100644 --- a/tests/testsuite/git.rs +++ b/tests/testsuite/git.rs @@ -3509,7 +3509,8 @@ fn two_dep_forms() { // the two local deps. project .cargo("check") - .with_stderr_data(str![[r#" + .with_stderr_data( + str![[r#" [UPDATING] git repository `[ROOTURL]/dep1` [UPDATING] git repository `[ROOTURL]/dep1` [LOCKING] 3 packages to latest compatible versions @@ -3519,7 +3520,9 @@ fn two_dep_forms() { [CHECKING] foo v0.5.0 ([ROOT]/foo) [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s -"#]]) +"#]] + .unordered(), + ) .run(); } From 493d9c61628ae6150c9b7edb0070ab70017e6e58 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 6 Mar 2026 12:33:45 +0000 Subject: [PATCH 3/3] fix(script): surpress `unused_features` lint for embedded (#16714) ### What does this PR try to resolve? https://github.com/rust-lang/rust/pull/152164 added a warn-by-default `unused_features` lint. Cargo injects `#![feature(frontmatter)]` for all embedded scripts, but scripts without frontmatter syntax never trigger feature gate check, and causes causing the lint warning. Given the stabilization FCP of frontmatter [is complete](https://github.com/rust-lang/rust/pull/148051#issuecomment-3868109254) already, we could expect it will soon be stabilized (?). It should be fine we suppress this new unstable lint. ### How to test and review this PR? Test suite passes. See for more. --- src/cargo/core/compiler/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index 014a2781c79..77dc6089fb5 100644 --- a/src/cargo/core/compiler/mod.rs +++ b/src/cargo/core/compiler/mod.rs @@ -802,6 +802,7 @@ fn prepare_rustc(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> CargoResult ); } base.arg("-Z").arg("crate-attr=feature(frontmatter)"); + base.arg("-Z").arg("crate-attr=allow(unused_features)"); } base.inherit_jobserver(&build_runner.jobserver); @@ -857,6 +858,7 @@ fn prepare_rustdoc(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> CargoResu ); } rustdoc.arg("-Z").arg("crate-attr=feature(frontmatter)"); + rustdoc.arg("-Z").arg("crate-attr=allow(unused_features)"); } rustdoc.inherit_jobserver(&build_runner.jobserver); let crate_name = unit.target.crate_name();