summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorxFrednet <xFrednet@gmail.com>2021-07-15 23:51:34 +0200
committerxFrednet <xFrednet@gmail.com>2021-07-15 23:57:02 +0200
commitd38f2b0cc1c58392fe9736c468e8943fc6472096 (patch)
treeb757220379c0a19e87aadb465a0de2b305835fbd /library/alloc/src
parent1a900042abe4ee9626cd7274816816e9ca691a25 (diff)
downloadrust-d38f2b0cc1c58392fe9736c468e8943fc6472096.tar.gz
rust-d38f2b0cc1c58392fe9736c468e8943fc6472096.zip
Added diagnostic items to structs and traits for Clippy
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/borrow.rs1
-rw-r--r--library/alloc/src/collections/btree/map/entry.rs1
2 files changed, 2 insertions, 0 deletions
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")]