How to opt out of doc tests?


I searched for a way of opting out of doc tests and found no_run as in:


(I used ' for backticks above).

However, that doesn’t seem to work with rust 1.32. What should I be using: and where is it documented?


That is the correct syntax. It’s documented in the rustdoc book. Why do you think it’s not working?


no_run means “this should compile, but don’t try to execute it.” ignore is what you want.


Thanks for that link. I didn’t mean no_run (since that still compiles), I meant ignore, which I now use and it works fine.