diff options
| author | GnomedDev <david2005thomas@gmail.com> | 2024-09-18 22:01:52 +0100 |
|---|---|---|
| committer | GnomedDev <david2005thomas@gmail.com> | 2024-09-19 13:13:42 +0100 |
| commit | 5b552702258e537fea1d95119ff1d309697bdadb (patch) | |
| tree | ffbee952005f1fcfbe42ae0ee233b8c6cbf44501 /library/core | |
| parent | 25da0e2e5db45cb7d8d265ad90de6b4d213ce94c (diff) | |
| download | rust-5b552702258e537fea1d95119ff1d309697bdadb.tar.gz rust-5b552702258e537fea1d95119ff1d309697bdadb.zip | |
[Clippy] Swap `filter_map_bool_then` to use diagnostic item instead of path
Diffstat (limited to 'library/core')
| -rw-r--r-- | library/core/src/bool.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/bool.rs b/library/core/src/bool.rs index 03cdff9b13b..58a870d2e07 100644 --- a/library/core/src/bool.rs +++ b/library/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, F: FnOnce() -> T>(self, f: F) -> Option<T> { if self { Some(f()) } else { None } |
