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
      --> src/lib.rs:22:5
       |
    22 |   //! use dyn_clone::DynClone;
       |  _____^
    23 | | //!
    24 | | //! trait MyTrait: DynClone {
    25 | | //!     fn recite(&self);
    ...  |
    46 | | //!     x2.recite();
    47 | | //! }
       | |_____^
       |
       = 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)]`
  • Loading branch information
dtolnay committed Sep 13, 2023
1 parent acc61c8 commit 4cc91e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Expand Up @@ -86,7 +86,11 @@

#![doc(html_root_url = "https://docs.rs/dyn_clone/1.0.13")]
#![no_std]
#![allow(clippy::missing_panics_doc, clippy::ptr_as_ptr)]
#![allow(
clippy::missing_panics_doc,
clippy::needless_doctest_main,
clippy::ptr_as_ptr
)]

extern crate alloc;

Expand Down

0 comments on commit 4cc91e2

Please sign in to comment.