11error: `iter` method without an `IntoIterator` impl for `&S1`
2- --> $DIR/iter_without_into_iter.rs:6 :5
2+ --> $DIR/iter_without_into_iter.rs:8 :5
33 |
44LL | / pub fn iter(&self) -> std::slice::Iter<'_, u8> {
55LL | |
2222 |
2323
2424error: `iter_mut` method without an `IntoIterator` impl for `&mut S1`
25- --> $DIR/iter_without_into_iter.rs:10 :5
25+ --> $DIR/iter_without_into_iter.rs:12 :5
2626 |
2727LL | / pub fn iter_mut(&mut self) -> std::slice::IterMut<'_, u8> {
2828LL | |
4343 |
4444
4545error: `iter` method without an `IntoIterator` impl for `&S3<'a>`
46- --> $DIR/iter_without_into_iter.rs:26 :5
46+ --> $DIR/iter_without_into_iter.rs:28 :5
4747 |
4848LL | / pub fn iter(&self) -> std::slice::Iter<'_, u8> {
4949LL | |
6464 |
6565
6666error: `iter_mut` method without an `IntoIterator` impl for `&mut S3<'a>`
67- --> $DIR/iter_without_into_iter.rs:30 :5
67+ --> $DIR/iter_without_into_iter.rs:32 :5
6868 |
6969LL | / pub fn iter_mut(&mut self) -> std::slice::IterMut<'_, u8> {
7070LL | |
8585 |
8686
8787error: `iter` method without an `IntoIterator` impl for `&S8<T>`
88- --> $DIR/iter_without_into_iter.rs:67 :5
88+ --> $DIR/iter_without_into_iter.rs:69 :5
8989 |
9090LL | / pub fn iter(&self) -> std::slice::Iter<'static, T> {
9191LL | | todo!()
@@ -105,7 +105,7 @@ LL + }
105105 |
106106
107107error: `iter` method without an `IntoIterator` impl for `&S9<T>`
108- --> $DIR/iter_without_into_iter.rs:75 :5
108+ --> $DIR/iter_without_into_iter.rs:77 :5
109109 |
110110LL | / pub fn iter(&self) -> std::slice::Iter<'_, T> {
111111LL | |
@@ -126,7 +126,7 @@ LL + }
126126 |
127127
128128error: `iter_mut` method without an `IntoIterator` impl for `&mut S9<T>`
129- --> $DIR/iter_without_into_iter.rs:79 :5
129+ --> $DIR/iter_without_into_iter.rs:81 :5
130130 |
131131LL | / pub fn iter_mut(&mut self) -> std::slice::IterMut<'_, T> {
132132LL | |
@@ -146,5 +146,29 @@ LL + }
146146LL + }
147147 |
148148
149- error: aborting due to 7 previous errors
149+ error: `iter` method without an `IntoIterator` impl for `&Issue12037`
150+ --> $DIR/iter_without_into_iter.rs:130:13
151+ |
152+ LL | / fn iter(&self) -> std::slice::Iter<'_, u8> {
153+ LL | | todo!()
154+ LL | | }
155+ | |_____________^
156+ ...
157+ LL | generate_impl!();
158+ | ---------------- in this macro invocation
159+ |
160+ = note: this error originates in the macro `generate_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
161+ help: consider implementing `IntoIterator` for `&Issue12037`
162+ |
163+ LL ~
164+ LL + impl IntoIterator for &Issue12037 {
165+ LL + type IntoIter = std::slice::Iter<'_, u8>;
166+ LL + type Item = &u8;
167+ LL + fn into_iter(self) -> Self::IntoIter {
168+ LL + self.iter()
169+ LL + }
170+ LL + }
171+ |
172+
173+ error: aborting due to 8 previous errors
150174
0 commit comments