]> git.lizzy.rs Git - rust.git/blob - tests/ui/swap.stderr
Merge branch 'master' into rustfmt_tests
[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 17 | /     let temp = foo[0];
5 18 | |     foo[0] = foo[1];
6 19 | |     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 26 | /     let temp = foo[0];
15 27 | |     foo[0] = foo[1];
16 28 | |     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 35 | /     let temp = foo[0];
23 36 | |     foo[0] = foo[1];
24 37 | |     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:53:6
29    |
30 53 |   ;    let t = a;
31    |  ______^
32 54 | |     a = b;
33 55 | |     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:62:6
40    |
41 62 |   ;    let t = c.0;
42    |  ______^
43 63 | |     c.0 = a;
44 64 | |     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:50:5
51    |
52 50 | /     a = b;
53 51 | |     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:59:5
61    |
62 59 | /     c.0 = a;
63 60 | |     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