]> git.lizzy.rs Git - rust.git/blob - tests/ui/swap.stderr
Merge pull request #1520 from Manishearth/rustup
[rust.git] / tests / ui / swap.stderr
1 error: this looks like you are swapping elements of `foo` manually
2   --> $DIR/swap.rs:11:5
3    |
4 11 |       let temp = foo[0];
5    |  _____^ starting here...
6 12 | |     foo[0] = foo[1];
7 13 | |     foo[1] = temp;
8    | |_________________^ ...ending here
9    |
10    = note: #[deny(manual_swap)] implied by #[deny(clippy)]
11 note: lint level defined here
12   --> $DIR/swap.rs:4:9
13    |
14 4  | #![deny(clippy)]
15    |         ^^^^^^
16 help: try
17    |     foo.swap(0, 1);
18
19 error: this looks like you are swapping elements of `foo` manually
20   --> $DIR/swap.rs:23:5
21    |
22 23 |       let temp = foo[0];
23    |  _____^ starting here...
24 24 | |     foo[0] = foo[1];
25 25 | |     foo[1] = temp;
26    | |_________________^ ...ending here
27    |
28    = note: #[deny(manual_swap)] implied by #[deny(clippy)]
29 help: try
30    |     foo.swap(0, 1);
31
32 error: this looks like you are swapping elements of `foo` manually
33   --> $DIR/swap.rs:35:5
34    |
35 35 |       let temp = foo[0];
36    |  _____^ starting here...
37 36 | |     foo[0] = foo[1];
38 37 | |     foo[1] = temp;
39    | |_________________^ ...ending here
40    |
41    = note: #[deny(manual_swap)] implied by #[deny(clippy)]
42 help: try
43    |     foo.swap(0, 1);
44
45 error: this looks like you are swapping `a` and `b` manually
46   --> $DIR/swap.rs:60:7
47    |
48 60 |       ; let t = a;
49    |  _______^ starting here...
50 61 | |     a = b;
51 62 | |     b = t;
52    | |_________^ ...ending here
53    |
54    = note: #[deny(manual_swap)] implied by #[deny(clippy)]
55 help: try
56    |     ; std::mem::swap(&mut a, &mut b);
57    = note: or maybe you should use `std::mem::replace`?
58
59 error: this looks like you are swapping `c.0` and `a` manually
60   --> $DIR/swap.rs:77:7
61    |
62 77 |       ; let t = c.0;
63    |  _______^ starting here...
64 78 | |     c.0 = a;
65 79 | |     a = t;
66    | |_________^ ...ending here
67    |
68    = note: #[deny(manual_swap)] implied by #[deny(clippy)]
69 help: try
70    |     ; std::mem::swap(&mut c.0, &mut a);
71    = note: or maybe you should use `std::mem::replace`?
72
73 error: this looks like you are trying to swap `a` and `b`
74   --> $DIR/swap.rs:53:5
75    |
76 53 |       a = b;
77    |  _____^ starting here...
78 54 | |     b = a;
79    | |_________^ ...ending here
80    |
81    = note: #[deny(almost_swapped)] implied by #[deny(clippy)]
82 note: lint level defined here
83   --> $DIR/swap.rs:4:9
84    |
85 4  | #![deny(clippy)]
86    |         ^^^^^^
87 help: try
88    |     std::mem::swap(&mut a, &mut b);
89    = note: or maybe you should use `std::mem::replace`?
90
91 error: this looks like you are trying to swap `c.0` and `a`
92   --> $DIR/swap.rs:70:5
93    |
94 70 |       c.0 = a;
95    |  _____^ starting here...
96 71 | |     a = c.0;
97    | |___________^ ...ending here
98    |
99    = note: #[deny(almost_swapped)] implied by #[deny(clippy)]
100 help: try
101    |     std::mem::swap(&mut c.0, &mut a);
102    = note: or maybe you should use `std::mem::replace`?
103
104 error: aborting due to 7 previous errors
105