]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/iter.rs
Add `#[rustc_on_unimplemented]` annotations to more traits
[rust.git] / src / libcore / iter.rs
index 773ac99b0dee2ff803f85430105c4a1c20596218..c31ad56fe5bab4e3f33001f6c27f4f30eec9ae9c 100644 (file)
@@ -82,6 +82,8 @@
 /// else.
 #[lang="iterator"]
 #[stable]
+#[rustc_on_unimplemented = "`{Self}` is not an iterator; maybe try calling `.iter()` or a similar \
+                            method"]
 pub trait Iterator {
     #[stable]
     type Item;