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: https://github.com/rust-lang/rust-clippy/issues/5393
This commit is contained in:
commit
eaeaeb92a5
@ -192,6 +192,7 @@
|
|||||||
Duration,
|
Duration,
|
||||||
Encodable,
|
Encodable,
|
||||||
Encoder,
|
Encoder,
|
||||||
|
Enumerate,
|
||||||
Eq,
|
Eq,
|
||||||
Equal,
|
Equal,
|
||||||
Err,
|
Err,
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[cfg_attr(not(test), rustc_diagnostic_item = "Enumerate")]
|
||||||
pub struct Enumerate<I> {
|
pub struct Enumerate<I> {
|
||||||
iter: I,
|
iter: I,
|
||||||
count: usize,
|
count: usize,
|
||||||
|
Loading…
Reference in New Issue
Block a user