1
1
error: `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
3
3
|
4
4
LL | / pub fn iter(&self) -> std::slice::Iter<'_, u8> {
5
5
LL | |
22
22
|
23
23
24
24
error: `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
26
26
|
27
27
LL | / pub fn iter_mut(&mut self) -> std::slice::IterMut<'_, u8> {
28
28
LL | |
43
43
|
44
44
45
45
error: `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
47
47
|
48
48
LL | / pub fn iter(&self) -> std::slice::Iter<'_, u8> {
49
49
LL | |
64
64
|
65
65
66
66
error: `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
68
68
|
69
69
LL | / pub fn iter_mut(&mut self) -> std::slice::IterMut<'_, u8> {
70
70
LL | |
85
85
|
86
86
87
87
error: `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
89
89
|
90
90
LL | / pub fn iter(&self) -> std::slice::Iter<'static, T> {
91
91
LL | | todo!()
@@ -105,7 +105,7 @@ LL + }
105
105
|
106
106
107
107
error: `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
109
109
|
110
110
LL | / pub fn iter(&self) -> std::slice::Iter<'_, T> {
111
111
LL | |
@@ -126,7 +126,7 @@ LL + }
126
126
|
127
127
128
128
error: `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
130
130
|
131
131
LL | / pub fn iter_mut(&mut self) -> std::slice::IterMut<'_, T> {
132
132
LL | |
@@ -146,5 +146,29 @@ LL + }
146
146
LL + }
147
147
|
148
148
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
150
174
0 commit comments