]> git.lizzy.rs Git - rust.git/blob - tests/ui/misnamed_getters.stderr
Fix adjacent code
[rust.git] / tests / ui / misnamed_getters.stderr
1 error: getter function appears to return the wrong field
2   --> $DIR/misnamed_getters.rs:11:5
3    |
4 LL | /     fn a(&self) -> &u8 {
5 LL | |         &self.b
6    | |         ------- help: consider using: `&self.a`
7 LL | |     }
8    | |_____^
9    |
10    = note: `-D clippy::misnamed-getters` implied by `-D warnings`
11
12 error: getter function appears to return the wrong field
13   --> $DIR/misnamed_getters.rs:14:5
14    |
15 LL | /     fn a_mut(&mut self) -> &mut u8 {
16 LL | |         &mut self.b
17    | |         ----------- help: consider using: `&mut self.a`
18 LL | |     }
19    | |_____^
20
21 error: getter function appears to return the wrong field
22   --> $DIR/misnamed_getters.rs:18:5
23    |
24 LL | /     fn b(self) -> u8 {
25 LL | |         self.a
26    | |         ------ help: consider using: `self.b`
27 LL | |     }
28    | |_____^
29
30 error: getter function appears to return the wrong field
31   --> $DIR/misnamed_getters.rs:22:5
32    |
33 LL | /     fn b_mut(&mut self) -> &mut u8 {
34 LL | |         &mut self.a
35    | |         ----------- help: consider using: `&mut self.b`
36 LL | |     }
37    | |_____^
38
39 error: getter function appears to return the wrong field
40   --> $DIR/misnamed_getters.rs:26:5
41    |
42 LL | /     fn c(&self) -> &u8 {
43 LL | |         &self.b
44    | |         ------- help: consider using: `&self.c`
45 LL | |     }
46    | |_____^
47
48 error: getter function appears to return the wrong field
49   --> $DIR/misnamed_getters.rs:30:5
50    |
51 LL | /     fn c_mut(&mut self) -> &mut u8 {
52 LL | |         &mut self.a
53    | |         ----------- help: consider using: `&mut self.c`
54 LL | |     }
55    | |_____^
56
57 error: getter function appears to return the wrong field
58   --> $DIR/misnamed_getters.rs:41:5
59    |
60 LL | /     unsafe fn a(&self) -> &u8 {
61 LL | |         &self.b
62    | |         ------- help: consider using: `&self.a`
63 LL | |     }
64    | |_____^
65
66 error: getter function appears to return the wrong field
67   --> $DIR/misnamed_getters.rs:44:5
68    |
69 LL | /     unsafe fn a_mut(&mut self) -> &mut u8 {
70 LL | |         &mut self.b
71    | |         ----------- help: consider using: `&mut self.a`
72 LL | |     }
73    | |_____^
74
75 error: getter function appears to return the wrong field
76   --> $DIR/misnamed_getters.rs:48:5
77    |
78 LL | /     unsafe fn b(self) -> u8 {
79 LL | |         self.a
80    | |         ------ help: consider using: `self.b`
81 LL | |     }
82    | |_____^
83
84 error: getter function appears to return the wrong field
85   --> $DIR/misnamed_getters.rs:52:5
86    |
87 LL | /     unsafe fn b_mut(&mut self) -> &mut u8 {
88 LL | |         &mut self.a
89    | |         ----------- help: consider using: `&mut self.b`
90 LL | |     }
91    | |_____^
92
93 error: getter function appears to return the wrong field
94   --> $DIR/misnamed_getters.rs:64:5
95    |
96 LL | /     unsafe fn a_unchecked(&self) -> &u8 {
97 LL | |         &self.b
98    | |         ------- help: consider using: `&self.a`
99 LL | |     }
100    | |_____^
101
102 error: getter function appears to return the wrong field
103   --> $DIR/misnamed_getters.rs:67:5
104    |
105 LL | /     unsafe fn a_unchecked_mut(&mut self) -> &mut u8 {
106 LL | |         &mut self.b
107    | |         ----------- help: consider using: `&mut self.a`
108 LL | |     }
109    | |_____^
110
111 error: getter function appears to return the wrong field
112   --> $DIR/misnamed_getters.rs:71:5
113    |
114 LL | /     unsafe fn b_unchecked(self) -> u8 {
115 LL | |         self.a
116    | |         ------ help: consider using: `self.b`
117 LL | |     }
118    | |_____^
119
120 error: getter function appears to return the wrong field
121   --> $DIR/misnamed_getters.rs:75:5
122    |
123 LL | /     unsafe fn b_unchecked_mut(&mut self) -> &mut u8 {
124 LL | |         &mut self.a
125    | |         ----------- help: consider using: `&mut self.b`
126 LL | |     }
127    | |_____^
128
129 error: getter function appears to return the wrong field
130   --> $DIR/misnamed_getters.rs:107:5
131    |
132 LL | /     fn a(&self) -> &u8 {
133 LL | |         &self.b
134    | |         ------- help: consider using: `&self.a`
135 LL | |     }
136    | |_____^
137
138 error: getter function appears to return the wrong field
139   --> $DIR/misnamed_getters.rs:110:5
140    |
141 LL | /     fn a_mut(&mut self) -> &mut u8 {
142 LL | |         &mut self.b
143    | |         ----------- help: consider using: `&mut self.a`
144 LL | |     }
145    | |_____^
146
147 error: getter function appears to return the wrong field
148   --> $DIR/misnamed_getters.rs:114:5
149    |
150 LL | /     fn d(&self) -> &u8 {
151 LL | |         &self.b
152    | |         ------- help: consider using: `&self.d`
153 LL | |     }
154    | |_____^
155
156 error: getter function appears to return the wrong field
157   --> $DIR/misnamed_getters.rs:117:5
158    |
159 LL | /     fn d_mut(&mut self) -> &mut u8 {
160 LL | |         &mut self.b
161    | |         ----------- help: consider using: `&mut self.d`
162 LL | |     }
163    | |_____^
164
165 error: aborting due to 18 previous errors
166