-
Notifications
You must be signed in to change notification settings - Fork 2.6k
doctests don't print warnings by default #3938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I believe this is a bug for rustdoc, not cargo? |
er didn't mean to close yet |
Sure, is rustdoc an external crate? I didn't see it under |
Oh it's just a portion of the rust-lang/rust repository |
Should I file this issue with rust or rfcs then? |
Oh just in rust-lang/rust is fine, likely no need for an rfc |
Closing in lieu of rust-lang/rust#41574 |
Running
cargo test
runs doctests by default, and shows warnings for regular code, but not for the doctests themselves. This can be enabled by runningcargo 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?The text was updated successfully, but these errors were encountered: