Skip to content

Commit

Permalink
fix(--target): RUSTDOCFLAGS=--cap-lints=warn
Browse files Browse the repository at this point in the history
close obi1kenobi#1068

Cargo relies on warning diagnostics to find information,
--cap-lints=allow eliminates the warnings, so set the value to
warn level to keep it.
  • Loading branch information
zjp-CN committed Jan 8, 2025
1 parent 507393d commit ef8682e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/data_generation/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ fn run_cargo_doc(
// This fixes: https://github.com/obi1kenobi/cargo-semver-checks/issues/589
let rustflags = match std::env::var("RUSTFLAGS") {
Ok(mut prior_rustflags) => {
prior_rustflags.push_str(" --cap-lints=allow");
prior_rustflags.push_str(" --cap-lints=warn");
std::borrow::Cow::Owned(prior_rustflags)
}
Err(_) => std::borrow::Cow::Borrowed("--cap-lints=allow"),
Err(_) => std::borrow::Cow::Borrowed("--cap-lints=warn"),
};

// Ensure we preserve `RUSTDOCFLAGS` if they are set.
Expand Down

0 comments on commit ef8682e

Please sign in to comment.