11error: this looks like you are swapping `bar.a` and `bar.b` manually
2- --> $DIR/swap.rs:25 :5
2+ --> $DIR/swap.rs:27 :5
33 |
44LL | / let temp = bar.a;
55LL | | bar.a = bar.b;
@@ -10,55 +10,55 @@ LL | | bar.b = temp;
1010 = note: `-D clippy::manual-swap` implied by `-D warnings`
1111
1212error: this looks like you are swapping elements of `foo` manually
13- --> $DIR/swap.rs:37 :5
13+ --> $DIR/swap.rs:39 :5
1414 |
1515LL | / let temp = foo[0];
1616LL | | foo[0] = foo[1];
1717LL | | foo[1] = temp;
1818 | |__________________^ help: try: `foo.swap(0, 1);`
1919
2020error: this looks like you are swapping elements of `foo` manually
21- --> $DIR/swap.rs:46 :5
21+ --> $DIR/swap.rs:48 :5
2222 |
2323LL | / let temp = foo[0];
2424LL | | foo[0] = foo[1];
2525LL | | foo[1] = temp;
2626 | |__________________^ help: try: `foo.swap(0, 1);`
2727
2828error: this looks like you are swapping elements of `foo` manually
29- --> $DIR/swap.rs:65 :5
29+ --> $DIR/swap.rs:67 :5
3030 |
3131LL | / let temp = foo[0];
3232LL | | foo[0] = foo[1];
3333LL | | foo[1] = temp;
3434 | |__________________^ help: try: `foo.swap(0, 1);`
3535
3636error: this looks like you are swapping `a` and `b` manually
37- --> $DIR/swap.rs:76 :5
37+ --> $DIR/swap.rs:78 :5
3838 |
3939LL | / a ^= b;
4040LL | | b ^= a;
4141LL | | a ^= b;
4242 | |___________^ help: try: `std::mem::swap(&mut a, &mut b);`
4343
4444error: this looks like you are swapping `bar.a` and `bar.b` manually
45- --> $DIR/swap.rs:84 :5
45+ --> $DIR/swap.rs:86 :5
4646 |
4747LL | / bar.a ^= bar.b;
4848LL | | bar.b ^= bar.a;
4949LL | | bar.a ^= bar.b;
5050 | |___________________^ help: try: `std::mem::swap(&mut bar.a, &mut bar.b);`
5151
5252error: this looks like you are swapping elements of `foo` manually
53- --> $DIR/swap.rs:92 :5
53+ --> $DIR/swap.rs:94 :5
5454 |
5555LL | / foo[0] ^= foo[1];
5656LL | | foo[1] ^= foo[0];
5757LL | | foo[0] ^= foo[1];
5858 | |_____________________^ help: try: `foo.swap(0, 1);`
5959
6060error: this looks like you are swapping `foo[0][1]` and `bar[1][0]` manually
61- --> $DIR/swap.rs:121 :5
61+ --> $DIR/swap.rs:123 :5
6262 |
6363LL | / let temp = foo[0][1];
6464LL | | foo[0][1] = bar[1][0];
@@ -68,7 +68,7 @@ LL | | bar[1][0] = temp;
6868 = note: or maybe you should use `std::mem::replace`?
6969
7070error: this looks like you are swapping `a` and `b` manually
71- --> $DIR/swap.rs:135 :7
71+ --> $DIR/swap.rs:137 :7
7272 |
7373LL | ; let t = a;
7474 | _______^
@@ -79,7 +79,7 @@ LL | | b = t;
7979 = note: or maybe you should use `std::mem::replace`?
8080
8181error: this looks like you are swapping `c.0` and `a` manually
82- --> $DIR/swap.rs:144 :7
82+ --> $DIR/swap.rs:146 :7
8383 |
8484LL | ; let t = c.0;
8585 | _______^
@@ -90,7 +90,7 @@ LL | | a = t;
9090 = note: or maybe you should use `std::mem::replace`?
9191
9292error: this looks like you are swapping `b` and `a` manually
93- --> $DIR/swap.rs:170 :5
93+ --> $DIR/swap.rs:172 :5
9494 |
9595LL | / let t = b;
9696LL | | b = a;
@@ -100,7 +100,7 @@ LL | | a = t;
100100 = note: or maybe you should use `std::mem::replace`?
101101
102102error: this looks like you are trying to swap `a` and `b`
103- --> $DIR/swap.rs:132 :5
103+ --> $DIR/swap.rs:134 :5
104104 |
105105LL | / a = b;
106106LL | | b = a;
@@ -110,7 +110,7 @@ LL | | b = a;
110110 = note: `-D clippy::almost-swapped` implied by `-D warnings`
111111
112112error: this looks like you are trying to swap `c.0` and `a`
113- --> $DIR/swap.rs:141 :5
113+ --> $DIR/swap.rs:143 :5
114114 |
115115LL | / c.0 = a;
116116LL | | a = c.0;
@@ -119,7 +119,7 @@ LL | | a = c.0;
119119 = note: or maybe you should use `std::mem::replace`?
120120
121121error: this looks like you are trying to swap `a` and `b`
122- --> $DIR/swap.rs:148 :5
122+ --> $DIR/swap.rs:150 :5
123123 |
124124LL | / let a = b;
125125LL | | let b = a;
@@ -128,7 +128,7 @@ LL | | let b = a;
128128 = note: or maybe you should use `std::mem::replace`?
129129
130130error: this looks like you are trying to swap `d` and `c`
131- --> $DIR/swap.rs:153 :5
131+ --> $DIR/swap.rs:155 :5
132132 |
133133LL | / d = c;
134134LL | | c = d;
@@ -137,7 +137,7 @@ LL | | c = d;
137137 = note: or maybe you should use `std::mem::replace`?
138138
139139error: this looks like you are trying to swap `a` and `b`
140- --> $DIR/swap.rs:157 :5
140+ --> $DIR/swap.rs:159 :5
141141 |
142142LL | / let a = b;
143143LL | | b = a;
@@ -146,7 +146,7 @@ LL | | b = a;
146146 = note: or maybe you should use `std::mem::replace`?
147147
148148error: this looks like you are swapping `s.0.x` and `s.0.y` manually
149- --> $DIR/swap.rs:205 :5
149+ --> $DIR/swap.rs:207 :5
150150 |
151151LL | / let t = s.0.x;
152152LL | | s.0.x = s.0.y;
0 commit comments