Skip to content
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

Document how to deny warnings in examples #31

Open
Nemo157 opened this issue Jun 13, 2020 · 0 comments
Open

Document how to deny warnings in examples #31

Nemo157 opened this issue Jun 13, 2020 · 0 comments

Comments

@Nemo157
Copy link

Nemo157 commented Jun 13, 2020

You can inject attributes into all doctests which can allow denying warnings, either outright (not recommended for the same reason as #![deny(warnings)] isn't)

#![doc(test(attr(deny(warnings))))]

or only in CI

#![cfg_attr(ci, doc(test(attr(deny(warnings))))]

with a runner running

> RUSTDOCFLAGS='--cfg ci' cargo test --doc

(with the same downsides of failing on new compilers like using RUSTFLAGS='-Dwarnings' cargo check).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant