mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 08:30:45 +00:00
47 lines
991 B
Text
47 lines
991 B
Text
error: needless `fn main` in doctest
|
|
--> $DIR/needless_doc_main.rs:7:5
|
|
|
|
|
LL | /// fn main() {
|
|
| _____^
|
|
LL | |
|
|
LL | |
|
|
LL | | /// unimplemented!();
|
|
LL | | /// }
|
|
| |_____^
|
|
|
|
|
= note: `-D clippy::needless-doctest-main` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::needless_doctest_main)]`
|
|
|
|
error: needless `fn main` in doctest
|
|
--> $DIR/needless_doc_main.rs:16:5
|
|
|
|
|
LL | /// fn main() -> () {
|
|
| _____^
|
|
LL | |
|
|
LL | | /// unimplemented!();
|
|
LL | | /// }
|
|
| |_____^
|
|
|
|
error: needless `fn main` in doctest
|
|
--> $DIR/needless_doc_main.rs:24:5
|
|
|
|
|
LL | /// fn main() {
|
|
| _____^
|
|
LL | |
|
|
LL | | /// unimplemented!();
|
|
LL | | /// }
|
|
| |_____^
|
|
|
|
error: needless `fn main` in doctest
|
|
--> $DIR/needless_doc_main.rs:32:5
|
|
|
|
|
LL | /// // the fn is not always the first line
|
|
| _____^
|
|
LL | |
|
|
LL | | /// fn main() {
|
|
LL | | /// unimplemented!();
|
|
LL | | /// }
|
|
| |_____^
|
|
|
|
error: aborting due to 4 previous errors
|
|
|