@@ -38,7 +38,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
38
38
span_bug ! ( expr. span, "input to deref is not a ref?" ) ;
39
39
}
40
40
let ty = self . make_overloaded_place_return_type ( method) . ty ;
41
- self . write_method_call ( expr. hir_id , expr. span , method) ;
41
+ self . write_method_call_and_enforce_effects ( expr. hir_id , expr. span , method) ;
42
42
Some ( ty)
43
43
}
44
44
@@ -179,7 +179,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
179
179
}
180
180
self . apply_adjustments ( base_expr, adjustments) ;
181
181
182
- self . write_method_call ( expr. hir_id , expr. span , method) ;
182
+ self . write_method_call_and_enforce_effects ( expr. hir_id , expr. span , method) ;
183
183
184
184
return Some ( ( input_ty, self . make_overloaded_place_return_type ( method) . ty ) ) ;
185
185
}
@@ -404,7 +404,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
404
404
None => return ,
405
405
} ;
406
406
debug ! ( "convert_place_op_to_mutable: method={:?}" , method) ;
407
- self . write_method_call ( expr. hir_id , expr. span , method) ;
407
+ self . write_method_call_and_enforce_effects ( expr. hir_id , expr. span , method) ;
408
408
409
409
let ty:: Ref ( region, _, hir:: Mutability :: Mut ) = method. sig . inputs ( ) [ 0 ] . kind ( ) else {
410
410
span_bug ! ( expr. span, "input to mutable place op is not a mut ref?" ) ;
0 commit comments