From 925c1c4ffc83e467f4ef301670739e9a2e20fb46 Mon Sep 17 00:00:00 2001 From: GnomedDev Date: Wed, 18 Sep 2024 22:01:52 +0100 Subject: [PATCH] [Clippy] Swap `filter_map_bool_then` to use diagnostic item instead of path --- core/src/bool.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/bool.rs b/core/src/bool.rs index 03cdff9b13be1..58a870d2e0725 100644 --- a/core/src/bool.rs +++ b/core/src/bool.rs @@ -55,6 +55,7 @@ impl bool { /// assert_eq!(a, 1); /// ``` #[stable(feature = "lazy_bool_to_option", since = "1.50.0")] + #[cfg_attr(not(test), rustc_diagnostic_item = "bool_then")] #[inline] pub fn then T>(self, f: F) -> Option { if self { Some(f()) } else { None }