@@ -73,8 +73,8 @@ error: getter function appears to return the wrong field
73
73
LL | / unsafe fn a(&self) -> &u8 {
74
74
LL | |
75
75
LL | |
76
- LL | | &self.b
77
- | | ------- help: consider using: `&self.a`
76
+ LL | | unsafe { &self.b }
77
+ | | ------- help: consider using: `&self.a`
78
78
LL | | }
79
79
| |_____^
80
80
@@ -84,8 +84,8 @@ error: getter function appears to return the wrong field
84
84
LL | / unsafe fn a_mut(&mut self) -> &mut u8 {
85
85
LL | |
86
86
LL | |
87
- LL | | &mut self.b
88
- | | ----------- help: consider using: `&mut self.a`
87
+ LL | | unsafe { &mut self.b }
88
+ | | ----------- help: consider using: `&mut self.a`
89
89
LL | | }
90
90
| |_____^
91
91
@@ -95,8 +95,8 @@ error: getter function appears to return the wrong field
95
95
LL | / unsafe fn b(self) -> u8 {
96
96
LL | |
97
97
LL | |
98
- LL | | self.a
99
- | | ------ help: consider using: `self.b`
98
+ LL | | unsafe { self.a }
99
+ | | ------ help: consider using: `self.b`
100
100
LL | | }
101
101
| |_____^
102
102
@@ -106,8 +106,8 @@ error: getter function appears to return the wrong field
106
106
LL | / unsafe fn b_mut(&mut self) -> &mut u8 {
107
107
LL | |
108
108
LL | |
109
- LL | | &mut self.a
110
- | | ----------- help: consider using: `&mut self.b`
109
+ LL | | unsafe { &mut self.a }
110
+ | | ----------- help: consider using: `&mut self.b`
111
111
LL | | }
112
112
| |_____^
113
113
@@ -117,8 +117,8 @@ error: getter function appears to return the wrong field
117
117
LL | / unsafe fn a_unchecked(&self) -> &u8 {
118
118
LL | |
119
119
LL | |
120
- LL | | &self.b
121
- | | ------- help: consider using: `&self.a`
120
+ LL | | unsafe { &self.b }
121
+ | | ------- help: consider using: `&self.a`
122
122
LL | | }
123
123
| |_____^
124
124
@@ -128,8 +128,8 @@ error: getter function appears to return the wrong field
128
128
LL | / unsafe fn a_unchecked_mut(&mut self) -> &mut u8 {
129
129
LL | |
130
130
LL | |
131
- LL | | &mut self.b
132
- | | ----------- help: consider using: `&mut self.a`
131
+ LL | | unsafe { &mut self.b }
132
+ | | ----------- help: consider using: `&mut self.a`
133
133
LL | | }
134
134
| |_____^
135
135
@@ -139,8 +139,8 @@ error: getter function appears to return the wrong field
139
139
LL | / unsafe fn b_unchecked(self) -> u8 {
140
140
LL | |
141
141
LL | |
142
- LL | | self.a
143
- | | ------ help: consider using: `self.b`
142
+ LL | | unsafe { self.a }
143
+ | | ------ help: consider using: `self.b`
144
144
LL | | }
145
145
| |_____^
146
146
@@ -150,8 +150,8 @@ error: getter function appears to return the wrong field
150
150
LL | / unsafe fn b_unchecked_mut(&mut self) -> &mut u8 {
151
151
LL | |
152
152
LL | |
153
- LL | | &mut self.a
154
- | | ----------- help: consider using: `&mut self.b`
153
+ LL | | unsafe { &mut self.a }
154
+ | | ----------- help: consider using: `&mut self.b`
155
155
LL | | }
156
156
| |_____^
157
157
0 commit comments