Skip to content

Commit

Permalink
Unrolled build for rust-lang#124308
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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
  • Loading branch information
rust-timer authored Apr 24, 2024
2 parents 7bb4f08 + bcc4469 commit 1e4f7d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ symbols! {
Duration,
Encodable,
Encoder,
Enumerate,
Eq,
Equal,
Err,
Expand Down
1 change: 1 addition & 0 deletions library/core/src/iter/adapters/enumerate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use crate::ops::Try;
#[derive(Clone, Debug)]
#[must_use = "iterators are lazy and do nothing unless consumed"]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "Enumerate")]
pub struct Enumerate<I> {
iter: I,
count: usize,
Expand Down

0 comments on commit 1e4f7d7

Please sign in to comment.