@@ -153,13 +153,7 @@ impl<'a> TypingPredicate<'a> {
153
153
T :: Ref ( inner_mtbl, _) => {
154
154
rule_variant = o. inherited_ref_on_ref ;
155
155
match o. inherited_ref_on_ref {
156
- InheritedRefOnRefBehavior :: EatOuter => {
157
- if o. simplify_deref_mut && bm_mtbl == Mutable {
158
- underlying_place
159
- } else {
160
- self . expr . deref ( a)
161
- }
162
- }
156
+ InheritedRefOnRefBehavior :: EatOuter => self . expr . deref ( a) ,
163
157
InheritedRefOnRefBehavior :: EatInner => {
164
158
let can_eat_inner = match ( p_mtbl, * inner_mtbl) {
165
159
( Shared , Shared ) => true ,
@@ -175,11 +169,7 @@ impl<'a> TypingPredicate<'a> {
175
169
underlying_place. deref ( a)
176
170
} else if o. fallback_to_outer {
177
171
fallback_to_outer = FallbackToOuter ( true ) ;
178
- if o. simplify_deref_mut && bm_mtbl == Mutable {
179
- underlying_place
180
- } else {
181
- self . expr . deref ( a)
182
- }
172
+ self . expr . deref ( a)
183
173
} else {
184
174
return Err ( TypeError :: MutabilityMismatch ) ;
185
175
}
@@ -198,11 +188,7 @@ impl<'a> TypingPredicate<'a> {
198
188
underlying_place. deref ( a)
199
189
} else if o. fallback_to_outer {
200
190
fallback_to_outer = FallbackToOuter ( true ) ;
201
- if o. simplify_deref_mut && bm_mtbl == Mutable {
202
- underlying_place
203
- } else {
204
- self . expr . deref ( a)
205
- }
191
+ self . expr . deref ( a)
206
192
} else {
207
193
return Err ( TypeError :: MutabilityMismatch ) ;
208
194
}
@@ -215,11 +201,7 @@ impl<'a> TypingPredicate<'a> {
215
201
T :: Tuple ( _) | T :: OtherNonRef ( _) | T :: AbstractNonRef ( ..)
216
202
if o. eat_inherited_ref_alone =>
217
203
{
218
- if o. simplify_deref_mut && bm_mtbl == Mutable {
219
- underlying_place
220
- } else {
221
- self . expr . deref ( a)
222
- }
204
+ self . expr . deref ( a)
223
205
}
224
206
T :: Tuple ( _) | T :: OtherNonRef ( _) | T :: AbstractNonRef ( ..) => {
225
207
return Err ( TypeError :: InheritedRefIsAlone ) ;
0 commit comments