How to opt out of running a doc test?

This is documented in The rustdoc book, specifically the chapter about attributes.

Your opening codeblock delimiter should look like:

/// ```no_run

From the book:

/// ```no_run
/// loop {
///     println!("Hello, world");
/// }
/// ```

The no_run attribute will compile your code, but not run it. This is
important for examples such as “Here’s how to retrieve a web page,”
which you would want to ensure compiles, but might be run in a test
environment that has no network access.

To omit build completely use ignore instead of no_run.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)