From c1f2d2474a1be589b9a2e9a2b774029e0df31a92 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 2 Dec 2023 18:22:26 -0800 Subject: [PATCH] Ignore test_attr_in_doctest clippy lint warning: unit tests in doctest are not executed --> src/lib.rs:34:5 | 34 | //! #[test] | _____^ 35 | | //! fn ui() { | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#test_attr_in_doctest = note: `-W clippy::test-attr-in-doctest` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::test_attr_in_doctest)]` warning: unit tests in doctest are not executed --> src/lib.rs:81:5 | 81 | //! #[test] | _____^ 82 | | //! fn ui() { | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#test_attr_in_doctest This is correctly used in trybuild. --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 7e531da..154a904 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -227,6 +227,7 @@ clippy::range_plus_one, clippy::similar_names, clippy::single_match_else, + clippy::test_attr_in_doctest, clippy::too_many_lines, clippy::trivially_copy_pass_by_ref, clippy::unused_self,