|
1 | 1 | error: getter function appears to return the wrong field
|
2 |
| - --> $DIR/missnamed_getters.rs:12:9 |
| 2 | + --> $DIR/missnamed_getters.rs:11:5 |
3 | 3 | |
|
4 |
| -LL | &self.b |
5 |
| - | ^^^^^^^ help: consider using: `&self.a` |
| 4 | +LL | / fn a(&self) -> &u8 { |
| 5 | +LL | | &self.b |
| 6 | + | | ------- help: consider using: `&self.a` |
| 7 | +LL | | } |
| 8 | + | |_____^ |
6 | 9 | |
|
7 | 10 | = note: `-D clippy::missnamed-getters` implied by `-D warnings`
|
8 | 11 |
|
9 | 12 | error: getter function appears to return the wrong field
|
10 |
| - --> $DIR/missnamed_getters.rs:15:9 |
| 13 | + --> $DIR/missnamed_getters.rs:14:5 |
11 | 14 | |
|
12 |
| -LL | &mut self.b |
13 |
| - | ^^^^^^^^^^^ help: consider using: `&mut self.a` |
| 15 | +LL | / fn a_mut(&mut self) -> &mut u8 { |
| 16 | +LL | | &mut self.b |
| 17 | + | | ----------- help: consider using: `&mut self.a` |
| 18 | +LL | | } |
| 19 | + | |_____^ |
14 | 20 |
|
15 | 21 | error: getter function appears to return the wrong field
|
16 |
| - --> $DIR/missnamed_getters.rs:19:9 |
| 22 | + --> $DIR/missnamed_getters.rs:18:5 |
17 | 23 | |
|
18 |
| -LL | self.a |
19 |
| - | ^^^^^^ help: consider using: `self.b` |
| 24 | +LL | / fn b(self) -> u8 { |
| 25 | +LL | | self.a |
| 26 | + | | ------ help: consider using: `self.b` |
| 27 | +LL | | } |
| 28 | + | |_____^ |
20 | 29 |
|
21 | 30 | error: getter function appears to return the wrong field
|
22 |
| - --> $DIR/missnamed_getters.rs:23:9 |
| 31 | + --> $DIR/missnamed_getters.rs:22:5 |
23 | 32 | |
|
24 |
| -LL | &mut self.a |
25 |
| - | ^^^^^^^^^^^ help: consider using: `&mut self.b` |
| 33 | +LL | / fn b_mut(&mut self) -> &mut u8 { |
| 34 | +LL | | &mut self.a |
| 35 | + | | ----------- help: consider using: `&mut self.b` |
| 36 | +LL | | } |
| 37 | + | |_____^ |
26 | 38 |
|
27 | 39 | error: getter function appears to return the wrong field
|
28 |
| - --> $DIR/missnamed_getters.rs:27:9 |
| 40 | + --> $DIR/missnamed_getters.rs:26:5 |
29 | 41 | |
|
30 |
| -LL | &self.b |
31 |
| - | ^^^^^^^ help: consider using: `&self.c` |
| 42 | +LL | / fn c(&self) -> &u8 { |
| 43 | +LL | | &self.b |
| 44 | + | | ------- help: consider using: `&self.c` |
| 45 | +LL | | } |
| 46 | + | |_____^ |
32 | 47 |
|
33 | 48 | error: getter function appears to return the wrong field
|
34 |
| - --> $DIR/missnamed_getters.rs:31:9 |
| 49 | + --> $DIR/missnamed_getters.rs:30:5 |
35 | 50 | |
|
36 |
| -LL | &mut self.a |
37 |
| - | ^^^^^^^^^^^ help: consider using: `&mut self.c` |
| 51 | +LL | / fn c_mut(&mut self) -> &mut u8 { |
| 52 | +LL | | &mut self.a |
| 53 | + | | ----------- help: consider using: `&mut self.c` |
| 54 | +LL | | } |
| 55 | + | |_____^ |
38 | 56 |
|
39 | 57 | error: getter function appears to return the wrong field
|
40 |
| - --> $DIR/missnamed_getters.rs:42:9 |
| 58 | + --> $DIR/missnamed_getters.rs:41:5 |
41 | 59 | |
|
42 |
| -LL | &self.b |
43 |
| - | ^^^^^^^ help: consider using: `&self.a` |
| 60 | +LL | / unsafe fn a(&self) -> &u8 { |
| 61 | +LL | | &self.b |
| 62 | + | | ------- help: consider using: `&self.a` |
| 63 | +LL | | } |
| 64 | + | |_____^ |
44 | 65 |
|
45 | 66 | error: getter function appears to return the wrong field
|
46 |
| - --> $DIR/missnamed_getters.rs:45:9 |
| 67 | + --> $DIR/missnamed_getters.rs:44:5 |
47 | 68 | |
|
48 |
| -LL | &mut self.b |
49 |
| - | ^^^^^^^^^^^ help: consider using: `&mut self.a` |
| 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 | + | |_____^ |
50 | 74 |
|
51 | 75 | error: getter function appears to return the wrong field
|
52 |
| - --> $DIR/missnamed_getters.rs:49:9 |
| 76 | + --> $DIR/missnamed_getters.rs:48:5 |
53 | 77 | |
|
54 |
| -LL | self.a |
55 |
| - | ^^^^^^ help: consider using: `self.b` |
| 78 | +LL | / unsafe fn b(self) -> u8 { |
| 79 | +LL | | self.a |
| 80 | + | | ------ help: consider using: `self.b` |
| 81 | +LL | | } |
| 82 | + | |_____^ |
56 | 83 |
|
57 | 84 | error: getter function appears to return the wrong field
|
58 |
| - --> $DIR/missnamed_getters.rs:53:9 |
| 85 | + --> $DIR/missnamed_getters.rs:52:5 |
59 | 86 | |
|
60 |
| -LL | &mut self.a |
61 |
| - | ^^^^^^^^^^^ help: consider using: `&mut self.b` |
| 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 | + | |_____^ |
62 | 92 |
|
63 | 93 | error: aborting due to 10 previous errors
|
64 | 94 |
|
0 commit comments