]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/swap.stderr
Fix the test suite after cargo update
[rust.git] / clippy_tests / examples / swap.stderr
1 error: this looks like you are swapping elements of `foo` manually
2   --> swap.rs:11:5
3    |
4 11 | /     let temp = foo[0];
5 12 | |     foo[0] = foo[1];
6 13 | |     foo[1] = temp;
7    | |_________________^ help: try `foo.swap(0, 1)`
8    |
9    = note: `-D manual-swap` implied by `-D warnings`
10
11 error: this looks like you are swapping elements of `foo` manually
12   --> swap.rs:20:5
13    |
14 20 | /     let temp = foo[0];
15 21 | |     foo[0] = foo[1];
16 22 | |     foo[1] = temp;
17    | |_________________^ help: try `foo.swap(0, 1)`
18    |
19    = note: `-D manual-swap` implied by `-D warnings`
20
21 error: this looks like you are swapping elements of `foo` manually
22   --> swap.rs:29:5
23    |
24 29 | /     let temp = foo[0];
25 30 | |     foo[0] = foo[1];
26 31 | |     foo[1] = temp;
27    | |_________________^ help: try `foo.swap(0, 1)`
28    |
29    = note: `-D manual-swap` implied by `-D warnings`
30
31 error: this looks like you are swapping `a` and `b` manually
32   --> swap.rs:47:7
33    |
34 47 |       ; let t = a;
35    |  _______^
36 48 | |     a = b;
37 49 | |     b = t;
38    | |_________^ help: try `std::mem::swap(&mut a, &mut b)`
39    |
40    = note: `-D manual-swap` implied by `-D warnings`
41    = note: or maybe you should use `std::mem::replace`?
42
43 error: this looks like you are swapping `c.0` and `a` manually
44   --> swap.rs:56:7
45    |
46 56 |       ; let t = c.0;
47    |  _______^
48 57 | |     c.0 = a;
49 58 | |     a = t;
50    | |_________^ help: try `std::mem::swap(&mut c.0, &mut a)`
51    |
52    = note: `-D manual-swap` implied by `-D warnings`
53    = note: or maybe you should use `std::mem::replace`?
54
55 error: this looks like you are trying to swap `a` and `b`
56   --> swap.rs:44:5
57    |
58 44 | /     a = b;
59 45 | |     b = a;
60    | |_________^ help: try `std::mem::swap(&mut a, &mut b)`
61    |
62    = note: `-D almost-swapped` implied by `-D warnings`
63    = note: or maybe you should use `std::mem::replace`?
64
65 error: this looks like you are trying to swap `c.0` and `a`
66   --> swap.rs:53:5
67    |
68 53 | /     c.0 = a;
69 54 | |     a = c.0;
70    | |___________^ help: try `std::mem::swap(&mut c.0, &mut a)`
71    |
72    = note: `-D almost-swapped` implied by `-D warnings`
73    = note: or maybe you should use `std::mem::replace`?
74
75 error: aborting due to previous error(s)
76
77
78 To learn more, run the command again with --verbose.