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(); 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(); } 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(); }