Skip to content

Commit

Permalink
Unconditionally set build.rustdocflags
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay authored and syphar committed Apr 7, 2024
1 parent 2236f10 commit c838c47
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions crates/metadata/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,11 @@ impl Metadata {
cargo_args.push(format!("host.rustflags={rustflags}"));
}

if !all_rustdoc_args.is_empty() {
cargo_args.push("--config".into());
let rustdocflags = toml::Value::try_from(&all_rustdoc_args)
.expect("serializing a string should never fail")
.to_string();
cargo_args.push(format!("build.rustdocflags={rustdocflags}"));
}
cargo_args.push("--config".into());
let rustdocflags = toml::Value::try_from(&all_rustdoc_args)
.expect("serializing a string should never fail")
.to_string();
cargo_args.push(format!("build.rustdocflags={rustdocflags}"));

cargo_args.extend(additional_args.iter().map(|s| s.to_owned()));
cargo_args.extend_from_slice(&self.cargo_args);
Expand Down

0 comments on commit c838c47

Please sign in to comment.