Skip to content

Commit eaeaeb9

Browse files
authored
Rollup merge of #124308 - CBSpeir:diagnostic-item-enumerate, r=compiler-errors
Add diagnostic item for `std::iter::Enumerate` This adds a diagnostic item for `std::iter::Enumerate`. The change will be used by the clippy `unused_enumerate_index` lint to move away from type paths to using diagnostic items. see: rust-lang/rust-clippy#5393
2 parents 388dc0d + bcc4469 commit eaeaeb9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ symbols! {
192192
Duration,
193193
Encodable,
194194
Encoder,
195+
Enumerate,
195196
Eq,
196197
Equal,
197198
Err,

library/core/src/iter/adapters/enumerate.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use crate::ops::Try;
1515
#[derive(Clone, Debug)]
1616
#[must_use = "iterators are lazy and do nothing unless consumed"]
1717
#[stable(feature = "rust1", since = "1.0.0")]
18+
#[cfg_attr(not(test), rustc_diagnostic_item = "Enumerate")]
1819
pub struct Enumerate<I> {
1920
iter: I,
2021
count: usize,

0 commit comments

Comments
 (0)