diff options
| author | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-08-04 22:20:30 +0200 |
|---|---|---|
| committer | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-08-04 22:20:30 +0200 |
| commit | b3317dd0550a7e04997eacea353d936306e5eac0 (patch) | |
| tree | 5882de483c77220c28f6855110e4c1a8b9a002bb /library/alloc/src | |
| parent | e1b9081e699065badfc1a9419ec9566e5c8615c4 (diff) | |
| download | rust-b3317dd0550a7e04997eacea353d936306e5eac0.tar.gz rust-b3317dd0550a7e04997eacea353d936306e5eac0.zip | |
Correct the use of `must_use` on btree::IterMut
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/collections/btree/map.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs index 17c16e4aaff..acbbb6df9a5 100644 --- a/library/alloc/src/collections/btree/map.rs +++ b/library/alloc/src/collections/btree/map.rs @@ -382,6 +382,7 @@ impl<'a, K: 'a, V: 'a> Default for Iter<'a, K, V> { /// documentation for more. /// /// [`iter_mut`]: BTreeMap::iter_mut +#[must_use = "iterators are lazy and do nothing unless consumed"] #[stable(feature = "rust1", since = "1.0.0")] pub struct IterMut<'a, K: 'a, V: 'a> { range: LazyLeafRange<marker::ValMut<'a>, K, V>, @@ -391,7 +392,6 @@ pub struct IterMut<'a, K: 'a, V: 'a> { _marker: PhantomData<&'a mut (K, V)>, } -#[must_use = "iterators are lazy and do nothing unless consumed"] #[stable(feature = "collection_debug", since = "1.17.0")] impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for IterMut<'_, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
