Skip to content

Commit f5064bb

Browse files
committed
test: add -Zunstable-options with custom targets
rustc is destabilising custom targets (rust-lang/rust#150151) and requiring that `-Zunstable-options` is passed when custom targets are used. This is the minimum change required so that the rustc patch can be merged.
1 parent b8ba7ae commit f5064bb

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)