Skip to content

Commit

Permalink
Ignore needless_doctest_main clippy lint
Browse files Browse the repository at this point in the history
    warning: needless `fn main` in doctest
      --> unindent/src/lib.rs:24:5
       |
    24 |   //! use unindent::unindent;
       |  _____^
    25 | | //!
    26 | | //! fn main() {
    27 | | //!     let indented = "
    ...  |
    30 | | //!     assert_eq!("line one\nline two", unindent(indented));
    31 | | //! }
       | |_____^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
       = note: `-W clippy::needless-doctest-main` implied by `-W clippy::all`
       = help: to override `-W clippy::all` add `#[allow(clippy::needless_doctest_main)]`

    warning: needless `fn main` in doctest
      --> unindent/src/lib.rs:38:5
       |
    38 |   //! use unindent::Unindent;
       |  _____^
    39 | | //!
    40 | | //! fn main() {
    41 | | //!     let indented = format!("
    ...  |
    44 | | //!     assert_eq!("line one\nline two", indented.unindent());
    45 | | //! }
       | |_____^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
  • Loading branch information
dtolnay committed Sep 13, 2023
1 parent 4d305be commit 07c8ac4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions unindent/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
clippy::missing_panics_doc,
clippy::module_name_repetitions,
clippy::must_use_candidate,
clippy::needless_doctest_main,
clippy::trivially_copy_pass_by_ref,
clippy::type_complexity
)]
Expand Down

0 comments on commit 07c8ac4

Please sign in to comment.