Skip to content

Commit b3317dd

Browse files
Correct the use of must_use on btree::IterMut
Signed-off-by: Jonathan Brouwer <[email protected]>
1 parent e1b9081 commit b3317dd

File tree

1 file changed

+1
-1
lines changed
  • library/alloc/src/collections/btree

1 file changed

+1
-1
lines changed

library/alloc/src/collections/btree/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ impl<'a, K: 'a, V: 'a> Default for Iter<'a, K, V> {
382382
/// documentation for more.
383383
///
384384
/// [`iter_mut`]: BTreeMap::iter_mut
385+
#[must_use = "iterators are lazy and do nothing unless consumed"]
385386
#[stable(feature = "rust1", since = "1.0.0")]
386387
pub struct IterMut<'a, K: 'a, V: 'a> {
387388
range: LazyLeafRange<marker::ValMut<'a>, K, V>,
@@ -391,7 +392,6 @@ pub struct IterMut<'a, K: 'a, V: 'a> {
391392
_marker: PhantomData<&'a mut (K, V)>,
392393
}
393394

394-
#[must_use = "iterators are lazy and do nothing unless consumed"]
395395
#[stable(feature = "collection_debug", since = "1.17.0")]
396396
impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for IterMut<'_, K, V> {
397397
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

0 commit comments

Comments
 (0)