Description
Running cargo test runs doctests by default, and shows warnings for regular code, but not for the doctests themselves. This can be enabled by running cargo test -- --nocapture. I'd like to have warnings also show in our CI tests, even for doctests, but setting -- --nocapture shows all the output which we don't want (and can't control, because they come from the underlying libraries complaining about our tests that are supposed to fail).
I'd think having warnings on for doctests by default would be good, but that wouldn't be backwards compatible. Maybe a --doctest-warnings option could be added in lieu of that?
I believe this was done in 5d145c1, so discussion there might be worth reading. It seems that there are a bunch of warnings that come up with doctests that should be ignored, but there are also ones that can appear that shouldn't be. The question is how do we address both needs?