Skip to content

Commit 3cc3435

Browse files
author
Joshua Nelson
authored
Rollup merge of rust-lang#82578 - camsteffen:diag-items, r=oli-obk
Add some diagnostic items for Clippy
2 parents b3039e5 + 1c07263 commit 3cc3435

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

alloc/src/collections/binary_heap.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ use super::SpecExtend;
247247
/// [peek]: BinaryHeap::peek
248248
/// [peek\_mut]: BinaryHeap::peek_mut
249249
#[stable(feature = "rust1", since = "1.0.0")]
250+
#[cfg_attr(not(test), rustc_diagnostic_item = "BinaryHeap")]
250251
pub struct BinaryHeap<T> {
251252
data: Vec<T>,
252253
}

alloc/src/collections/btree/map.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ pub(super) const MIN_LEN: usize = node::MIN_LEN_AFTER_SPLIT;
138138
/// *stat += random_stat_buff();
139139
/// ```
140140
#[stable(feature = "rust1", since = "1.0.0")]
141+
#[cfg_attr(not(test), rustc_diagnostic_item = "BTreeMap")]
141142
pub struct BTreeMap<K, V> {
142143
root: Option<Root<K, V>>,
143144
length: usize,

alloc/src/collections/btree/set.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ use super::Recover;
6161
/// ```
6262
#[derive(Hash, PartialEq, Eq, Ord, PartialOrd)]
6363
#[stable(feature = "rust1", since = "1.0.0")]
64+
#[cfg_attr(not(test), rustc_diagnostic_item = "BTreeSet")]
6465
pub struct BTreeSet<T> {
6566
map: BTreeMap<T, ()>,
6667
}

alloc/src/collections/linked_list.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ mod tests;
3535
/// array-based containers are generally faster,
3636
/// more memory efficient, and make better use of CPU cache.
3737
#[stable(feature = "rust1", since = "1.0.0")]
38+
#[cfg_attr(not(test), rustc_diagnostic_item = "LinkedList")]
3839
pub struct LinkedList<T> {
3940
head: Option<NonNull<Node<T>>>,
4041
tail: Option<NonNull<Node<T>>>,

std/src/sync/mpsc/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ mod cache_aligned;
310310
/// println!("{}", recv.recv().unwrap()); // Received after 2 seconds
311311
/// ```
312312
#[stable(feature = "rust1", since = "1.0.0")]
313+
#[cfg_attr(not(test), rustc_diagnostic_item = "Receiver")]
313314
pub struct Receiver<T> {
314315
inner: UnsafeCell<Flavor<T>>,
315316
}

0 commit comments

Comments
 (0)