1
1
error: this looks like you are swapping `bar.a` and `bar.b` manually
2
- --> $DIR/swap.rs:25 :5
2
+ --> $DIR/swap.rs:27 :5
3
3
|
4
4
LL | / let temp = bar.a;
5
5
LL | | bar.a = bar.b;
@@ -10,55 +10,55 @@ LL | | bar.b = temp;
10
10
= note: `-D clippy::manual-swap` implied by `-D warnings`
11
11
12
12
error: this looks like you are swapping elements of `foo` manually
13
- --> $DIR/swap.rs:37 :5
13
+ --> $DIR/swap.rs:39 :5
14
14
|
15
15
LL | / let temp = foo[0];
16
16
LL | | foo[0] = foo[1];
17
17
LL | | foo[1] = temp;
18
18
| |__________________^ help: try: `foo.swap(0, 1);`
19
19
20
20
error: this looks like you are swapping elements of `foo` manually
21
- --> $DIR/swap.rs:46 :5
21
+ --> $DIR/swap.rs:48 :5
22
22
|
23
23
LL | / let temp = foo[0];
24
24
LL | | foo[0] = foo[1];
25
25
LL | | foo[1] = temp;
26
26
| |__________________^ help: try: `foo.swap(0, 1);`
27
27
28
28
error: this looks like you are swapping elements of `foo` manually
29
- --> $DIR/swap.rs:65 :5
29
+ --> $DIR/swap.rs:67 :5
30
30
|
31
31
LL | / let temp = foo[0];
32
32
LL | | foo[0] = foo[1];
33
33
LL | | foo[1] = temp;
34
34
| |__________________^ help: try: `foo.swap(0, 1);`
35
35
36
36
error: this looks like you are swapping `a` and `b` manually
37
- --> $DIR/swap.rs:76 :5
37
+ --> $DIR/swap.rs:78 :5
38
38
|
39
39
LL | / a ^= b;
40
40
LL | | b ^= a;
41
41
LL | | a ^= b;
42
42
| |___________^ help: try: `std::mem::swap(&mut a, &mut b);`
43
43
44
44
error: this looks like you are swapping `bar.a` and `bar.b` manually
45
- --> $DIR/swap.rs:84 :5
45
+ --> $DIR/swap.rs:86 :5
46
46
|
47
47
LL | / bar.a ^= bar.b;
48
48
LL | | bar.b ^= bar.a;
49
49
LL | | bar.a ^= bar.b;
50
50
| |___________________^ help: try: `std::mem::swap(&mut bar.a, &mut bar.b);`
51
51
52
52
error: this looks like you are swapping elements of `foo` manually
53
- --> $DIR/swap.rs:92 :5
53
+ --> $DIR/swap.rs:94 :5
54
54
|
55
55
LL | / foo[0] ^= foo[1];
56
56
LL | | foo[1] ^= foo[0];
57
57
LL | | foo[0] ^= foo[1];
58
58
| |_____________________^ help: try: `foo.swap(0, 1);`
59
59
60
60
error: 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
62
62
|
63
63
LL | / let temp = foo[0][1];
64
64
LL | | foo[0][1] = bar[1][0];
@@ -68,7 +68,7 @@ LL | | bar[1][0] = temp;
68
68
= note: or maybe you should use `std::mem::replace`?
69
69
70
70
error: this looks like you are swapping `a` and `b` manually
71
- --> $DIR/swap.rs:135 :7
71
+ --> $DIR/swap.rs:137 :7
72
72
|
73
73
LL | ; let t = a;
74
74
| _______^
@@ -79,7 +79,7 @@ LL | | b = t;
79
79
= note: or maybe you should use `std::mem::replace`?
80
80
81
81
error: this looks like you are swapping `c.0` and `a` manually
82
- --> $DIR/swap.rs:144 :7
82
+ --> $DIR/swap.rs:146 :7
83
83
|
84
84
LL | ; let t = c.0;
85
85
| _______^
@@ -90,7 +90,7 @@ LL | | a = t;
90
90
= note: or maybe you should use `std::mem::replace`?
91
91
92
92
error: this looks like you are swapping `b` and `a` manually
93
- --> $DIR/swap.rs:170 :5
93
+ --> $DIR/swap.rs:172 :5
94
94
|
95
95
LL | / let t = b;
96
96
LL | | b = a;
@@ -100,7 +100,7 @@ LL | | a = t;
100
100
= note: or maybe you should use `std::mem::replace`?
101
101
102
102
error: this looks like you are trying to swap `a` and `b`
103
- --> $DIR/swap.rs:132 :5
103
+ --> $DIR/swap.rs:134 :5
104
104
|
105
105
LL | / a = b;
106
106
LL | | b = a;
@@ -110,7 +110,7 @@ LL | | b = a;
110
110
= note: `-D clippy::almost-swapped` implied by `-D warnings`
111
111
112
112
error: this looks like you are trying to swap `c.0` and `a`
113
- --> $DIR/swap.rs:141 :5
113
+ --> $DIR/swap.rs:143 :5
114
114
|
115
115
LL | / c.0 = a;
116
116
LL | | a = c.0;
@@ -119,7 +119,7 @@ LL | | a = c.0;
119
119
= note: or maybe you should use `std::mem::replace`?
120
120
121
121
error: this looks like you are trying to swap `a` and `b`
122
- --> $DIR/swap.rs:148 :5
122
+ --> $DIR/swap.rs:150 :5
123
123
|
124
124
LL | / let a = b;
125
125
LL | | let b = a;
@@ -128,7 +128,7 @@ LL | | let b = a;
128
128
= note: or maybe you should use `std::mem::replace`?
129
129
130
130
error: this looks like you are trying to swap `d` and `c`
131
- --> $DIR/swap.rs:153 :5
131
+ --> $DIR/swap.rs:155 :5
132
132
|
133
133
LL | / d = c;
134
134
LL | | c = d;
@@ -137,7 +137,7 @@ LL | | c = d;
137
137
= note: or maybe you should use `std::mem::replace`?
138
138
139
139
error: this looks like you are trying to swap `a` and `b`
140
- --> $DIR/swap.rs:157 :5
140
+ --> $DIR/swap.rs:159 :5
141
141
|
142
142
LL | / let a = b;
143
143
LL | | b = a;
@@ -146,7 +146,7 @@ LL | | b = a;
146
146
= note: or maybe you should use `std::mem::replace`?
147
147
148
148
error: 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
150
150
|
151
151
LL | / let t = s.0.x;
152
152
LL | | s.0.x = s.0.y;
0 commit comments