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:24 :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: or maybe you should use `std::mem::replace`?
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:36 :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:45 :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:64 :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:75 :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:83 :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:91 :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:120 :5
62
62
|
63
63
LL | / let temp = foo[0][1];
64
64
LL | | foo[0][1] = bar[1][0];
@@ -67,18 +67,8 @@ LL | | bar[1][0] = temp;
67
67
|
68
68
= note: or maybe you should use `std::mem::replace`?
69
69
70
- error: this looks like you are trying to swap `a` and `b`
71
- --> $DIR/swap.rs:133:5
72
- |
73
- LL | / a = b;
74
- LL | | b = a;
75
- | |_________^ help: try: `core::mem::swap(&mut a, &mut b)`
76
- |
77
- = note: `-D clippy::almost-swapped` implied by `-D warnings`
78
- = note: or maybe you should use `core::mem::replace`?
79
-
80
70
error: this looks like you are swapping `a` and `b` manually
81
- --> $DIR/swap.rs:158 :7
71
+ --> $DIR/swap.rs:134 :7
82
72
|
83
73
LL | ; let t = a;
84
74
| _______^
@@ -89,7 +79,7 @@ LL | | b = t;
89
79
= note: or maybe you should use `std::mem::replace`?
90
80
91
81
error: this looks like you are swapping `c.0` and `a` manually
92
- --> $DIR/swap.rs:167 :7
82
+ --> $DIR/swap.rs:143 :7
93
83
|
94
84
LL | ; let t = c.0;
95
85
| _______^
@@ -100,22 +90,23 @@ LL | | a = t;
100
90
= note: or maybe you should use `std::mem::replace`?
101
91
102
92
error: this looks like you are trying to swap `a` and `b`
103
- --> $DIR/swap.rs:155 :5
93
+ --> $DIR/swap.rs:131 :5
104
94
|
105
95
LL | / a = b;
106
96
LL | | b = a;
107
97
| |_________^ help: try: `std::mem::swap(&mut a, &mut b)`
108
98
|
99
+ = note: `-D clippy::almost-swapped` implied by `-D warnings`
109
100
= note: or maybe you should use `std::mem::replace`?
110
101
111
102
error: this looks like you are trying to swap `c.0` and `a`
112
- --> $DIR/swap.rs:164 :5
103
+ --> $DIR/swap.rs:140 :5
113
104
|
114
105
LL | / c.0 = a;
115
106
LL | | a = c.0;
116
107
| |___________^ help: try: `std::mem::swap(&mut c.0, &mut a)`
117
108
|
118
109
= note: or maybe you should use `std::mem::replace`?
119
110
120
- error: aborting due to 13 previous errors
111
+ error: aborting due to 12 previous errors
121
112
0 commit comments