From d38f2b0cc1c58392fe9736c468e8943fc6472096 Mon Sep 17 00:00:00 2001 From: xFrednet Date: Thu, 15 Jul 2021 23:51:34 +0200 Subject: Added diagnostic items to structs and traits for Clippy --- library/alloc/src/borrow.rs | 1 + library/alloc/src/collections/btree/map/entry.rs | 1 + 2 files changed, 2 insertions(+) (limited to 'library/alloc/src') diff --git a/library/alloc/src/borrow.rs b/library/alloc/src/borrow.rs index 9d61b3684b8..482a497201d 100644 --- a/library/alloc/src/borrow.rs +++ b/library/alloc/src/borrow.rs @@ -177,6 +177,7 @@ where /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] +#[cfg_attr(not(test), rustc_diagnostic_item = "Cow")] pub enum Cow<'a, B: ?Sized + 'a> where B: ToOwned, diff --git a/library/alloc/src/collections/btree/map/entry.rs b/library/alloc/src/collections/btree/map/entry.rs index 6b30d959773..5fec8dc2d13 100644 --- a/library/alloc/src/collections/btree/map/entry.rs +++ b/library/alloc/src/collections/btree/map/entry.rs @@ -14,6 +14,7 @@ use Entry::*; /// /// [`entry`]: BTreeMap::entry #[stable(feature = "rust1", since = "1.0.0")] +#[cfg_attr(not(test), rustc_diagnostic_item = "BTreeEntry")] pub enum Entry<'a, K: 'a, V: 'a> { /// A vacant entry. #[stable(feature = "rust1", since = "1.0.0")] -- cgit 1.4.1-3-g733a5