Skip to content

Commit b53c96b

Browse files
authored
test: add -Zunstable-options with custom targets (#16467)
rustc is destabilising custom targets (rust-lang/rust#150151) by requiring that `-Zunstable-options` is passed when custom targets are used. This patch is the minimum change required so that the rustc patch can be merged without failing the Cargo tests run in rustc's CI.
2 parents a71d838 + f5064bb commit b53c96b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/testsuite/rustc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ windows
821821
.run();
822822
}
823823

824-
#[cargo_test]
824+
#[cargo_test(nightly, reason = "custom targets are unstable in rustc")]
825825
fn rustc_with_print_cfg_config_toml_env() {
826826
let p = project()
827827
.file("Cargo.toml", &basic_bin_manifest("foo"))
@@ -841,6 +841,7 @@ RUST_TARGET_PATH = { value = "./targets", relative = true }
841841
p.cargo("rustc -Z unstable-options --print cfg")
842842
.masquerade_as_nightly_cargo(&["print"])
843843
.with_stdout_data(str!["..."].unordered())
844+
.env("RUSTFLAGS", "-Z unstable-options")
844845
.run();
845846
}
846847

0 commit comments

Comments
 (0)