#29 set RUSTDOCFLAGS to `--cap-lints=warn` in %cargo_test
Closed by decathorpe. Opened by decathorpe.

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.

Setting --cap-lints=warn for rustdoc in addition to rustc should fix this.


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.

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)

Metadata