Skip to content

Commit

Permalink
Merge pull request #9 from dtolnay/flags
Browse files Browse the repository at this point in the history
Remove --cfg=docsrs from rustflags
  • Loading branch information
dtolnay authored Feb 19, 2024
2 parents 624595a + 15a7bea commit 462d35a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,13 @@ fn do_main() -> Result<()> {
}

let mut rustflags = metadata.rustc_args.clone();
rustflags.insert(0, "--cfg=docsrs".to_owned());
if let Some(encoded_rustflags) = env::var_os("CARGO_ENCODED_RUSTFLAGS") {
if let Some(encoded_rustflags) = encoded_rustflags.to_str() {
rustflags.splice(1..1, encoded_rustflags.split('\x1f').map(str::to_owned));
rustflags.splice(0..0, encoded_rustflags.split('\x1f').map(str::to_owned));
}
} else if let Some(env_rustflags) = env::var_os("RUSTFLAGS") {
if let Some(env_rustflags) = env_rustflags.to_str() {
rustflags.splice(1..1, env_rustflags.split_whitespace().map(str::to_owned));
rustflags.splice(0..0, env_rustflags.split_whitespace().map(str::to_owned));
}
}

Expand Down

0 comments on commit 462d35a

Please sign in to comment.