mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 00:56:14 +00:00
ef7587d957
This checks if a) the `fn main() {}` function is empty or if the doctest contains a `static`. In both cases don't lint.
11 lines
236 B
Plaintext
11 lines
236 B
Plaintext
error: needless `fn main` in doctest
|
|
--> $DIR/needless_doc_main.rs:7:4
|
|
|
|
|
LL | /// fn main() {
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::needless-doctest-main` implied by `-D warnings`
|
|
|
|
error: aborting due to previous error
|
|
|