The no_run flag tells rustdoc to only check if the code block compiles (and therefore, not to run it). It's mostly used in cases involving external resources (such as files). For example:
/// ```no_run /// use std::fs::File; /// /// let mut f = File::open("some-file.txt").expect("file not found..."); /// ```
If you run this test, it's very likely (but not certain, since there is a possibility that some funny user decided to suddenly add a some-file.txt file) to fail at execution. However, the code is perfectly fine so it'd be a shame to just ignore it, right?
Now, let's see what to do if you want the test to fail: