The lint triggers for fn main()'s inside of multiline strings, like these:
/// ```
/// let string = r#"
/// fn main() {
/// // things
/// }
/// "#;
/// ```
fn my_documented_function() {
}
With:
warning: needless `fn main` in doctest
--> crates\rune\src\ast\decl_file.rs:40:4
|
40 | /// let string = r#"
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(clippy::needless_doctest_main)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main