Skip to content

Commit

Permalink
Remove -Zunstable-options from the generated cargo_args
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau authored and syphar committed Feb 1, 2024
1 parent 1725883 commit a29f0af
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions crates/metadata/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,6 @@ impl Metadata {
let mut all_rustdoc_args = self.rustdoc_args.clone();
all_rustdoc_args.extend_from_slice(rustdoc_args);

if !self.rustc_args.is_empty() || !all_rustdoc_args.is_empty() {
cargo_args.push("-Z".into());
cargo_args.push("unstable-options".into());
}

// Pass `RUSTFLAGS` and `RUSTDOCFLAGS` using `cargo --config`, which handles whitespace correctly.
if !self.rustc_args.is_empty() {
cargo_args.push("--config".into());
Expand Down Expand Up @@ -758,8 +753,6 @@ mod test_calculations {
String::from("rustdoc"),
"--lib".into(),
"-Zrustdoc-map".into(),
"-Z".into(),
"unstable-options".into(),
"--config".into(),
r#"build.rustdocflags=["-Z", "unstable-options", "--static-root-path", "/", "--cap-lints", "warn"]"#.into(),
];
Expand All @@ -774,8 +767,6 @@ mod test_calculations {
String::from("rustdoc"),
"--lib".into(),
"-Zrustdoc-map".into(),
"-Z".into(),
"unstable-options".into(),
"--config".into(),
"build.rustflags=[\"--cfg\", \"x\"]".into(),
"-Zhost-config".into(),
Expand Down

0 comments on commit a29f0af

Please sign in to comment.