Skip to content

Commit 7f3217e

Browse files
authored
Rollup merge of rust-lang#124542 - CBSpeir:diagnostic-item-enumerate-method, r=scottmcm
Add diagnostic item for `std::iter::Iterator::enumerate` Adds a diagnostic item for the `std::iter:Iterator::enumerate` trait method. This change, along with PR rust-lang#124308, will be used by the clippy `unused_enumerate_index` lint to move away from paths to using diagnostic items. see: rust-lang/rust-clippy#5393
2 parents dda7364 + 23224f3 commit 7f3217e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/iter/traits/iterator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,7 @@ pub trait Iterator {
974974
#[inline]
975975
#[stable(feature = "rust1", since = "1.0.0")]
976976
#[rustc_do_not_const_check]
977+
#[cfg_attr(not(test), rustc_diagnostic_item = "enumerate_method")]
977978
fn enumerate(self) -> Enumerate<Self>
978979
where
979980
Self: Sized,

0 commit comments

Comments
 (0)