summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorJoshua Nelson <joshua@yottadb.com>2021-03-01 11:25:07 -0500
committerGitHub <noreply@github.com>2021-03-01 11:25:07 -0500
commitefb9ee2df5a99a05e6f80ae1ad68019c8fa77107 (patch)
tree5943d2ebde54000d6446a08d0cd1ddc0b76aba86 /library/alloc/src
parent4f14f174859da3394f2014a4dcab59446c77b008 (diff)
parent6a3b834b39e0d6418e96cd7e3abd8043afd89d1c (diff)
downloadrust-efb9ee2df5a99a05e6f80ae1ad68019c8fa77107.tar.gz
rust-efb9ee2df5a99a05e6f80ae1ad68019c8fa77107.zip
Rollup merge of #82578 - camsteffen:diag-items, r=oli-obk
Add some diagnostic items for Clippy
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/collections/binary_heap.rs1
-rw-r--r--library/alloc/src/collections/btree/map.rs1
-rw-r--r--library/alloc/src/collections/btree/set.rs1
-rw-r--r--library/alloc/src/collections/linked_list.rs1
4 files changed, 4 insertions, 0 deletions
diff --git a/library/alloc/src/collections/binary_heap.rs b/library/alloc/src/collections/binary_heap.rs
index 33bd98d467c..4377780e15f 100644
--- a/library/alloc/src/collections/binary_heap.rs
+++ b/library/alloc/src/collections/binary_heap.rs
@@ -247,6 +247,7 @@ use super::SpecExtend;
 /// [peek]: BinaryHeap::peek
 /// [peek\_mut]: BinaryHeap::peek_mut
 #[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "BinaryHeap")]
 pub struct BinaryHeap<T> {
     data: Vec<T>,
 }
diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs
index 3ba95d9f47a..783f88f026b 100644
--- a/library/alloc/src/collections/btree/map.rs
+++ b/library/alloc/src/collections/btree/map.rs
@@ -138,6 +138,7 @@ pub(super) const MIN_LEN: usize = node::MIN_LEN_AFTER_SPLIT;
 /// *stat += random_stat_buff();
 /// ```
 #[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "BTreeMap")]
 pub struct BTreeMap<K, V> {
     root: Option<Root<K, V>>,
     length: usize,
diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs
index f2ec2774484..a331b8d8e4b 100644
--- a/library/alloc/src/collections/btree/set.rs
+++ b/library/alloc/src/collections/btree/set.rs
@@ -61,6 +61,7 @@ use super::Recover;
 /// ```
 #[derive(Hash, PartialEq, Eq, Ord, PartialOrd)]
 #[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "BTreeSet")]
 pub struct BTreeSet<T> {
     map: BTreeMap<T, ()>,
 }
diff --git a/library/alloc/src/collections/linked_list.rs b/library/alloc/src/collections/linked_list.rs
index 397e774f1a0..a5481fd175e 100644
--- a/library/alloc/src/collections/linked_list.rs
+++ b/library/alloc/src/collections/linked_list.rs
@@ -35,6 +35,7 @@ mod tests;
 /// array-based containers are generally faster,
 /// more memory efficient, and make better use of CPU cache.
 #[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "LinkedList")]
 pub struct LinkedList<T> {
     head: Option<NonNull<Node<T>>>,
     tail: Option<NonNull<Node<T>>>,