diff options
| author | Jubilee <workingjubilee@gmail.com> | 2024-09-18 14:32:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-18 14:32:28 -0700 |
| commit | 4bd9de55127318bd21fa4584c5f3cb2d24f21bc6 (patch) | |
| tree | bd0cbc3bba1ab0d481523def8b8fdbec647dd674 /library/alloc | |
| parent | 4d9ce4b4b3d16b3e788ea4e8cafd28f812aad8ac (diff) | |
| parent | a18564c1987e9c6009884af09092b4c2cd2dbbe1 (diff) | |
| download | rust-4bd9de55127318bd21fa4584c5f3cb2d24f21bc6.tar.gz rust-4bd9de55127318bd21fa4584c5f3cb2d24f21bc6.zip | |
Rollup merge of #130522 - GnomedDev:clippy-manual-retain-paths, r=compiler-errors
[Clippy] Swap `manual_retain` to use diagnostic items instead of paths Part of https://github.com/rust-lang/rust-clippy/issues/5393, just a chore.
Diffstat (limited to 'library/alloc')
| -rw-r--r-- | library/alloc/src/collections/binary_heap/mod.rs | 1 | ||||
| -rw-r--r-- | library/alloc/src/collections/btree/set.rs | 1 | ||||
| -rw-r--r-- | library/alloc/src/collections/vec_deque/mod.rs | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/library/alloc/src/collections/binary_heap/mod.rs b/library/alloc/src/collections/binary_heap/mod.rs index fe9f1010d32..a19a044fc7e 100644 --- a/library/alloc/src/collections/binary_heap/mod.rs +++ b/library/alloc/src/collections/binary_heap/mod.rs @@ -959,6 +959,7 @@ impl<T, A: Allocator> BinaryHeap<T, A> { /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(not(test), rustc_diagnostic_item = "binaryheap_iter")] pub fn iter(&self) -> Iter<'_, T> { Iter { iter: self.data.iter() } } diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs index 2b5bebcd8cd..770cd80ea9c 100644 --- a/library/alloc/src/collections/btree/set.rs +++ b/library/alloc/src/collections/btree/set.rs @@ -1132,6 +1132,7 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> { /// assert_eq!(set_iter.next(), None); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(not(test), rustc_diagnostic_item = "btreeset_iter")] pub fn iter(&self) -> Iter<'_, T> { Iter { iter: self.map.keys() } } diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index 8c9db063105..a438517b75b 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -1201,6 +1201,7 @@ impl<T, A: Allocator> VecDeque<T, A> { /// assert_eq!(&c[..], b); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(not(test), rustc_diagnostic_item = "vecdeque_iter")] pub fn iter(&self) -> Iter<'_, T> { let (a, b) = self.as_slices(); Iter::new(a.iter(), b.iter()) |
