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