@@ -187,7 +187,7 @@ impl<'c> Translation<'c> {
187187 ) ) )
188188 } else {
189189 let lhs = self . convert_cast (
190- ctx,
190+ ctx. used ( ) ,
191191 initial_lhs_type_id,
192192 compute_lhs_type_id,
193193 WithStmts :: new_val ( read. clone ( ) ) ,
@@ -199,7 +199,7 @@ impl<'c> Translation<'c> {
199199 let ty = self . convert_type ( compute_res_type_id. ctype ) ?;
200200 let val = lhs. and_then ( |lhs| {
201201 self . convert_binary_operator (
202- ctx,
202+ ctx. used ( ) ,
203203 bin_op,
204204 ty,
205205 compute_res_type_id. ctype ,
@@ -211,8 +211,15 @@ impl<'c> Translation<'c> {
211211 )
212212 } ) ?;
213213
214- let val =
215- self . convert_cast ( ctx, compute_res_type_id, lhs_type_id, val, None , None , None ) ?;
214+ let val = self . convert_cast (
215+ ctx. used ( ) ,
216+ compute_res_type_id,
217+ lhs_type_id,
218+ val,
219+ None ,
220+ None ,
221+ None ,
222+ ) ?;
216223
217224 Ok ( val. map ( |val| mk ( ) . assign_expr ( write. clone ( ) , val) ) )
218225 }
@@ -413,7 +420,7 @@ impl<'c> Translation<'c> {
413420 . expect ( "Cannot convert non-assignment operator" ) ;
414421
415422 let lhs = self . convert_cast (
416- ctx,
423+ ctx. used ( ) ,
417424 initial_lhs_type_id,
418425 expr_or_comp_type_id,
419426 WithStmts :: new_val ( read. clone ( ) ) ,
@@ -425,7 +432,7 @@ impl<'c> Translation<'c> {
425432 let ty = self . convert_type ( result_type_id. ctype ) ?;
426433 let val = lhs. and_then ( |lhs|
427434 self . convert_binary_operator (
428- ctx,
435+ ctx. used ( ) ,
429436 op,
430437 ty,
431438 result_type_id. ctype ,
@@ -438,7 +445,7 @@ impl<'c> Translation<'c> {
438445 ) ?;
439446
440447 let val = self . convert_cast (
441- ctx,
448+ ctx. used ( ) ,
442449 result_type_id,
443450 expr_type_id,
444451 val,
@@ -670,7 +677,7 @@ impl<'c> Translation<'c> {
670677 } ;
671678
672679 self . convert_assignment_operator_with_rhs (
673- ctx. used ( ) ,
680+ ctx,
674681 op,
675682 ty,
676683 arg,
@@ -810,7 +817,7 @@ impl<'c> Translation<'c> {
810817 . map ( |a| mk ( ) . unary_expr ( UnOp :: Not ( Default :: default ( ) ) , a) ) ) ,
811818
812819 CUnOp :: Not => {
813- let val = self . convert_condition ( ctx, false , arg) ?;
820+ let val = self . convert_condition ( ctx. used ( ) , false , arg) ?;
814821 Ok ( val. map ( |x| mk ( ) . cast_expr ( x, mk ( ) . abs_path_ty ( vec ! [ "core" , "ffi" , "c_int" ] ) ) ) )
815822 }
816823 CUnOp :: Extension => {
0 commit comments