@@ -46,7 +46,7 @@ error: this loop could be written as a `for` loop
4646 --> $DIR/while_let_on_iterator.rs:191:9
4747 |
4848LL | while let Some(m) = it.next() {
49- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in &mut it `
49+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref() `
5050
5151error: this loop could be written as a `for` loop
5252 --> $DIR/while_let_on_iterator.rs:202:5
@@ -70,19 +70,19 @@ error: this loop could be written as a `for` loop
7070 --> $DIR/while_let_on_iterator.rs:222:9
7171 |
7272LL | while let Some(m) = it.next() {
73- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in &mut it `
73+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref() `
7474
7575error: this loop could be written as a `for` loop
7676 --> $DIR/while_let_on_iterator.rs:239:9
7777 |
7878LL | while let Some(m) = it.next() {
79- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in &mut it `
79+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref() `
8080
8181error: this loop could be written as a `for` loop
8282 --> $DIR/while_let_on_iterator.rs:254:13
8383 |
8484LL | 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() `
8686
8787error: manual `!RangeInclusive::contains` implementation
8888 --> $DIR/while_let_on_iterator.rs:255:20
@@ -96,31 +96,31 @@ error: this loop could be written as a `for` loop
9696 --> $DIR/while_let_on_iterator.rs:286:13
9797 |
9898LL | 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() `
100100
101101error: this loop could be written as a `for` loop
102102 --> $DIR/while_let_on_iterator.rs:315:5
103103 |
104104LL | while let Some(n) = it.next() {
105- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in &mut it `
105+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in it.by_ref() `
106106
107107error: this loop could be written as a `for` loop
108108 --> $DIR/while_let_on_iterator.rs:327:9
109109 |
110110LL | while let Some(x) = it.next() {
111- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in &mut it `
111+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref() `
112112
113113error: this loop could be written as a `for` loop
114114 --> $DIR/while_let_on_iterator.rs:341:5
115115 |
116116LL | while let Some(x) = it.next() {
117- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in &mut *it `
117+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref() `
118118
119119error: this loop could be written as a `for` loop
120120 --> $DIR/while_let_on_iterator.rs:352:5
121121 |
122122LL | 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() `
124124
125125error: this loop could be written as a `for` loop
126126 --> $DIR/while_let_on_iterator.rs:371:5
0 commit comments