]> git.lizzy.rs Git - rust.git/blob - tests/ui/swap.stderr
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / swap.stderr
1 error: this looks like you are swapping elements of `foo` manually
2   --> $DIR/swap.rs:17:5
3    |
4 LL | /     let temp = foo[0];
5 LL | |     foo[0] = foo[1];
6 LL | |     foo[1] = temp;
7    | |_________________^ help: try: `foo.swap(0, 1)`
8    |
9    = note: `-D clippy::manual-swap` implied by `-D warnings`
10
11 error: this looks like you are swapping elements of `foo` manually
12   --> $DIR/swap.rs:26:5
13    |
14 LL | /     let temp = foo[0];
15 LL | |     foo[0] = foo[1];
16 LL | |     foo[1] = temp;
17    | |_________________^ help: try: `foo.swap(0, 1)`
18
19 error: this looks like you are swapping elements of `foo` manually
20   --> $DIR/swap.rs:35:5
21    |
22 LL | /     let temp = foo[0];
23 LL | |     foo[0] = foo[1];
24 LL | |     foo[1] = temp;
25    | |_________________^ help: try: `foo.swap(0, 1)`
26
27 error: this looks like you are swapping `a` and `b` manually
28   --> $DIR/swap.rs:54:7
29    |
30 LL |       ; let t = a;
31    |  _______^
32 LL | |     a = b;
33 LL | |     b = t;
34    | |_________^ help: try: `std::mem::swap(&mut a, &mut b)`
35    |
36    = note: or maybe you should use `std::mem::replace`?
37
38 error: this looks like you are swapping `c.0` and `a` manually
39   --> $DIR/swap.rs:63:7
40    |
41 LL |       ; let t = c.0;
42    |  _______^
43 LL | |     c.0 = a;
44 LL | |     a = t;
45    | |_________^ help: try: `std::mem::swap(&mut c.0, &mut a)`
46    |
47    = note: or maybe you should use `std::mem::replace`?
48
49 error: this looks like you are trying to swap `a` and `b`
50   --> $DIR/swap.rs:51:5
51    |
52 LL | /     a = b;
53 LL | |     b = a;
54    | |_________^ help: try: `std::mem::swap(&mut a, &mut b)`
55    |
56    = note: `-D clippy::almost-swapped` implied by `-D warnings`
57    = note: or maybe you should use `std::mem::replace`?
58
59 error: this looks like you are trying to swap `c.0` and `a`
60   --> $DIR/swap.rs:60:5
61    |
62 LL | /     c.0 = a;
63 LL | |     a = c.0;
64    | |___________^ help: try: `std::mem::swap(&mut c.0, &mut a)`
65    |
66    = note: or maybe you should use `std::mem::replace`?
67
68 error: aborting due to 7 previous errors
69