It looks like RUSTFLAGS are not passed to rustdoc when compiling doctests. Many projects use deny(warnings) in their doctests, causing problems with Rust updates.
rustdoc
deny(warnings)
Setting --cap-lints=warn for rustdoc in addition to rustc should fix this.
--cap-lints=warn
Looks like this doesn't work. I tried setting build.rustdocflags = "--cap-lints=warn" in .cargo/config that is generated by %cargo_prep, but it didn't change anything.
build.rustdocflags = "--cap-lints=warn"
.cargo/config
%cargo_prep
This does not work due to an at-least-5-year-old bug in rustdoc: https://github.com/rust-lang/rust/issues/67533
Looks like there is currently no way to pass the equivalent of --cap-lints=warn when compiling doctests.
Metadata Update from @decathorpe: - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.