@@ -38,7 +38,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
3838 span_bug ! ( expr. span, "input to deref is not a ref?" ) ;
3939 }
4040 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) ;
4242 Some ( ty)
4343 }
4444
@@ -179,7 +179,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
179179 }
180180 self . apply_adjustments ( base_expr, adjustments) ;
181181
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) ;
183183
184184 return Some ( ( input_ty, self . make_overloaded_place_return_type ( method) . ty ) ) ;
185185 }
@@ -404,7 +404,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
404404 None => return ,
405405 } ;
406406 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) ;
408408
409409 let ty:: Ref ( region, _, hir:: Mutability :: Mut ) = method. sig . inputs ( ) [ 0 ] . kind ( ) else {
410410 span_bug ! ( expr. span, "input to mutable place op is not a mut ref?" ) ;
0 commit comments