@@ -359,22 +359,9 @@ and borrowck_statement_of_json (ctx : of_json_ctx) (js : json) :
359359 | `Assoc [ (" FakeRead" , _0) ] ->
360360 let * _0 = place_of_json ctx _0 in
361361 Ok (FakeRead _0)
362- | `Assoc
363- [
364- ( " SetType" ,
365- `Assoc
366- [
367- (" place" , place);
368- (" ty" , ty);
369- (" variance" , variance);
370- (" temporary" , temporary);
371- ] );
372- ] ->
373- let * place = place_of_json ctx place in
374- let * ty = ty_of_json ctx ty in
375- let * variance = variance_of_json ctx variance in
376- let * temporary = bool_of_json ctx temporary in
377- Ok (SetType (place, ty, variance, temporary))
362+ | `Assoc [ (" SetType" , _0) ] ->
363+ let * _0 = place_type_constraint_of_json ctx _0 in
364+ Ok (SetType _0)
378365 | `Assoc [ (" SetOutlives" , _0) ] ->
379366 let * _0 = outlives_pred_of_json ctx _0 in
380367 Ok (SetOutlives _0)
@@ -1239,6 +1226,17 @@ and place_kind_of_json (ctx : of_json_ctx) (js : json) :
12391226 Ok (PlaceGlobal _0)
12401227 | _ -> Error " " )
12411228
1229+ and place_type_constraint_of_json (ctx : of_json_ctx ) (js : json ) :
1230+ (place_type_constraint , string ) result =
1231+ combine_error_msgs js __FUNCTION__
1232+ (match js with
1233+ | `Assoc [ (" place" , place); (" ty" , ty); (" variance" , variance) ] ->
1234+ let * place = place_of_json ctx place in
1235+ let * ty = ty_of_json ctx ty in
1236+ let * variance = variance_of_json ctx variance in
1237+ Ok ({ place; ty; variance } : place_type_constraint )
1238+ | _ -> Error " " )
1239+
12421240and poly_trait_ref_of_json (ctx : of_json_ctx ) (js : json ) :
12431241 (poly_trait_ref , string ) result =
12441242 combine_error_msgs js __FUNCTION__
@@ -3771,15 +3769,29 @@ and local_of_json (ctx : of_json_ctx) (js : json) : (local, string) result =
37713769 (" span" , span);
37723770 (" ty" , ty);
37733771 (" mutable" , mutable_);
3772+ (" borrowck_constraints" , borrowck_constraints);
37743773 (" drop_flag_for" , drop_flag_for);
37753774 ] ->
37763775 let * index = local_id_of_json ctx index in
37773776 let * name = option_of_json string_of_json ctx name in
37783777 let * span = span_of_json ctx span in
37793778 let * local_ty = ty_of_json ctx ty in
37803779 let * is_mutable = bool_of_json ctx mutable_ in
3780+ let * borrowck_constraints =
3781+ list_of_json place_type_constraint_of_json ctx borrowck_constraints
3782+ in
37813783 let * drop_flag_for = option_of_json place_of_json ctx drop_flag_for in
3782- Ok ({ index; name; span; local_ty; is_mutable; drop_flag_for } : local )
3784+ Ok
3785+ ({
3786+ index;
3787+ name;
3788+ span;
3789+ local_ty;
3790+ is_mutable;
3791+ borrowck_constraints;
3792+ drop_flag_for;
3793+ }
3794+ : local)
37833795 | _ -> Error " " )
37843796
37853797and locals_of_json (ctx : of_json_ctx ) (js : json ) : (locals, string) result =
0 commit comments