@@ -46,7 +46,7 @@ error: this loop could be written as a `for` loop
46
46
--> $DIR/while_let_on_iterator.rs:191:9
47
47
|
48
48
LL | while let Some(m) = it.next() {
49
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in &mut it `
49
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref() `
50
50
51
51
error: this loop could be written as a `for` loop
52
52
--> $DIR/while_let_on_iterator.rs:202:5
@@ -70,19 +70,19 @@ error: this loop could be written as a `for` loop
70
70
--> $DIR/while_let_on_iterator.rs:222:9
71
71
|
72
72
LL | while let Some(m) = it.next() {
73
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in &mut it `
73
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref() `
74
74
75
75
error: this loop could be written as a `for` loop
76
76
--> $DIR/while_let_on_iterator.rs:239:9
77
77
|
78
78
LL | while let Some(m) = it.next() {
79
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in &mut it `
79
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref() `
80
80
81
81
error: this loop could be written as a `for` loop
82
82
--> $DIR/while_let_on_iterator.rs:254:13
83
83
|
84
84
LL | while let Some(i) = self.0.next() {
85
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in &mut self.0`
85
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in self.0.by_ref() `
86
86
87
87
error: manual `!RangeInclusive::contains` implementation
88
88
--> $DIR/while_let_on_iterator.rs:255:20
@@ -96,31 +96,31 @@ error: this loop could be written as a `for` loop
96
96
--> $DIR/while_let_on_iterator.rs:286:13
97
97
|
98
98
LL | while let Some(i) = self.0.0.0.next() {
99
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in &mut self.0.0.0`
99
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in self.0.0.0.by_ref() `
100
100
101
101
error: this loop could be written as a `for` loop
102
102
--> $DIR/while_let_on_iterator.rs:315:5
103
103
|
104
104
LL | while let Some(n) = it.next() {
105
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in &mut it `
105
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in it.by_ref() `
106
106
107
107
error: this loop could be written as a `for` loop
108
108
--> $DIR/while_let_on_iterator.rs:327:9
109
109
|
110
110
LL | while let Some(x) = it.next() {
111
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in &mut it `
111
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref() `
112
112
113
113
error: this loop could be written as a `for` loop
114
114
--> $DIR/while_let_on_iterator.rs:341:5
115
115
|
116
116
LL | while let Some(x) = it.next() {
117
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in &mut *it `
117
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref() `
118
118
119
119
error: this loop could be written as a `for` loop
120
120
--> $DIR/while_let_on_iterator.rs:352:5
121
121
|
122
122
LL | while let Some(x) = it.0.next() {
123
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in &mut * it.0`
123
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.0.by_ref() `
124
124
125
125
error: this loop could be written as a `for` loop
126
126
--> $DIR/while_let_on_iterator.rs:371:5
0 commit comments