@@ -73,8 +73,8 @@ error: getter function appears to return the wrong field
7373LL | / unsafe fn a(&self) -> &u8 {
7474LL | |
7575LL | |
76- LL | | &self.b
77- | | ------- help: consider using: `&self.a`
76+ LL | | unsafe { &self.b }
77+ | | ------- help: consider using: `&self.a`
7878LL | | }
7979 | |_____^
8080
@@ -84,8 +84,8 @@ error: getter function appears to return the wrong field
8484LL | / unsafe fn a_mut(&mut self) -> &mut u8 {
8585LL | |
8686LL | |
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`
8989LL | | }
9090 | |_____^
9191
@@ -95,8 +95,8 @@ error: getter function appears to return the wrong field
9595LL | / unsafe fn b(self) -> u8 {
9696LL | |
9797LL | |
98- LL | | self.a
99- | | ------ help: consider using: `self.b`
98+ LL | | unsafe { self.a }
99+ | | ------ help: consider using: `self.b`
100100LL | | }
101101 | |_____^
102102
@@ -106,8 +106,8 @@ error: getter function appears to return the wrong field
106106LL | / unsafe fn b_mut(&mut self) -> &mut u8 {
107107LL | |
108108LL | |
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`
111111LL | | }
112112 | |_____^
113113
@@ -117,8 +117,8 @@ error: getter function appears to return the wrong field
117117LL | / unsafe fn a_unchecked(&self) -> &u8 {
118118LL | |
119119LL | |
120- LL | | &self.b
121- | | ------- help: consider using: `&self.a`
120+ LL | | unsafe { &self.b }
121+ | | ------- help: consider using: `&self.a`
122122LL | | }
123123 | |_____^
124124
@@ -128,8 +128,8 @@ error: getter function appears to return the wrong field
128128LL | / unsafe fn a_unchecked_mut(&mut self) -> &mut u8 {
129129LL | |
130130LL | |
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`
133133LL | | }
134134 | |_____^
135135
@@ -139,8 +139,8 @@ error: getter function appears to return the wrong field
139139LL | / unsafe fn b_unchecked(self) -> u8 {
140140LL | |
141141LL | |
142- LL | | self.a
143- | | ------ help: consider using: `self.b`
142+ LL | | unsafe { self.a }
143+ | | ------ help: consider using: `self.b`
144144LL | | }
145145 | |_____^
146146
@@ -150,8 +150,8 @@ error: getter function appears to return the wrong field
150150LL | / unsafe fn b_unchecked_mut(&mut self) -> &mut u8 {
151151LL | |
152152LL | |
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`
155155LL | | }
156156 | |_____^
157157
0 commit comments