Skip to content

Commit fe83565

Browse files
Fix build-plan generation with nightly feature
1 parent 3bbe127 commit fe83565

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/util/mod.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ pub(crate) fn get_dep_path() -> PathBuf {
2121
// Obtain the build plan from `cargo build`. This JSON plan will tell us
2222
// several things, including the path of the output of `auto_impl` (usually
2323
// an .so file on Linux).
24-
let output = Command::new(env!("CARGO"))
25-
.args(&["build", "-Z", "unstable-options", "--build-plan"])
26-
.stderr(Stdio::inherit())
27-
.output()
28-
.expect("failed to run `cargo build`");
24+
let mut command = Command::new(env!("CARGO"));
25+
command.args(&["build", "-Z", "unstable-options", "--build-plan"]);
26+
command.stderr(Stdio::inherit());
27+
28+
#[cfg(feature = "nightly")]
29+
command.arg("--features=nightly");
30+
31+
let output = command.output().expect("failed to run `cargo build`");
2932

3033
if !output.status.success() {
3134
panic!("failed to run `cargo build`");

0 commit comments

Comments
 (0)