@@ -537,7 +537,7 @@ impl ExprCompiled {
537
537
538
538
IrSpanned {
539
539
span,
540
- node : ExprCompiled :: Builtin2 ( Builtin2 :: Equals , box ( l, r) ) ,
540
+ node : ExprCompiled :: Builtin2 ( Builtin2 :: Equals , Box :: new ( ( l, r) ) ) ,
541
541
}
542
542
}
543
543
@@ -553,7 +553,7 @@ impl ExprCompiled {
553
553
// Collapse `not not e` to `e` only if `e` is known to produce a boolean.
554
554
ExprCompiled :: Builtin1 ( Builtin1 :: Not , e) if e. is_definitely_bool ( ) => ( * e) . clone ( ) ,
555
555
_ => IrSpanned {
556
- node : ExprCompiled :: Builtin1 ( Builtin1 :: Not , box expr) ,
556
+ node : ExprCompiled :: Builtin1 ( Builtin1 :: Not , Box :: new ( expr) ) ,
557
557
span,
558
558
} ,
559
559
}
@@ -581,7 +581,7 @@ impl ExprCompiled {
581
581
} else {
582
582
let span = l. span . merge ( & r. span ) ;
583
583
IrSpanned {
584
- node : ExprCompiled :: LogicalBinOp ( op, box ( l, r) ) ,
584
+ node : ExprCompiled :: LogicalBinOp ( op, Box :: new ( ( l, r) ) ) ,
585
585
span,
586
586
}
587
587
}
@@ -596,7 +596,7 @@ impl ExprCompiled {
596
596
} else {
597
597
let span = l. span . merge ( & r. span ) ;
598
598
IrSpanned {
599
- node : ExprCompiled :: Seq ( box ( l, r) ) ,
599
+ node : ExprCompiled :: Seq ( Box :: new ( ( l, r) ) ) ,
600
600
span,
601
601
}
602
602
}
@@ -614,7 +614,7 @@ impl ExprCompiled {
614
614
return ExprCompiled :: percent_s_one ( before, r, after, ctx) ;
615
615
}
616
616
}
617
- ExprCompiled :: Builtin2 ( Builtin2 :: Percent , box ( l, r) )
617
+ ExprCompiled :: Builtin2 ( Builtin2 :: Percent , Box :: new ( ( l, r) ) )
618
618
}
619
619
620
620
fn percent_s_one (
@@ -632,7 +632,7 @@ impl ExprCompiled {
632
632
}
633
633
}
634
634
635
- ExprCompiled :: Builtin1 ( Builtin1 :: PercentSOne ( before, after) , box arg)
635
+ ExprCompiled :: Builtin1 ( Builtin1 :: PercentSOne ( before, after) , Box :: new ( arg) )
636
636
}
637
637
638
638
pub ( crate ) fn format_one (
@@ -647,7 +647,7 @@ impl ExprCompiled {
647
647
return ExprCompiled :: Value ( value. to_frozen_value ( ) ) ;
648
648
}
649
649
650
- ExprCompiled :: Builtin1 ( Builtin1 :: FormatOne ( before, after) , box arg)
650
+ ExprCompiled :: Builtin1 ( Builtin1 :: FormatOne ( before, after) , Box :: new ( arg) )
651
651
}
652
652
653
653
fn add ( l : IrSpanned < ExprCompiled > , r : IrSpanned < ExprCompiled > ) -> ExprCompiled {
@@ -663,7 +663,7 @@ impl ExprCompiled {
663
663
. collect ( ) ;
664
664
return ExprCompiled :: List ( lr) ;
665
665
}
666
- ExprCompiled :: Builtin2 ( Builtin2 :: Add , box ( l, r) )
666
+ ExprCompiled :: Builtin2 ( Builtin2 :: Add , Box :: new ( ( l, r) ) )
667
667
}
668
668
669
669
pub ( crate ) fn bin_op (
@@ -688,7 +688,7 @@ impl ExprCompiled {
688
688
Builtin2 :: Add => ExprCompiled :: add ( l, r) ,
689
689
Builtin2 :: Equals => ExprCompiled :: equals ( l, r) . node ,
690
690
Builtin2 :: ArrayIndex => ExprCompiled :: array_indirection ( l, r, ctx) ,
691
- bin_op => ExprCompiled :: Builtin2 ( bin_op, box ( l, r) ) ,
691
+ bin_op => ExprCompiled :: Builtin2 ( bin_op, Box :: new ( ( l, r) ) ) ,
692
692
}
693
693
}
694
694
@@ -715,7 +715,7 @@ impl ExprCompiled {
715
715
} ;
716
716
let span = cond. span . merge ( & t. span ) . merge ( & f. span ) ;
717
717
IrSpanned {
718
- node : ExprCompiled :: If ( box ( cond, t, f) ) ,
718
+ node : ExprCompiled :: If ( Box :: new ( ( cond, t, f) ) ) ,
719
719
span,
720
720
}
721
721
}
@@ -746,7 +746,7 @@ impl ExprCompiled {
746
746
Builtin1 :: Dot ( field) => ExprCompiled :: dot ( expr, field, ctx) ,
747
747
Builtin1 :: TypeIs ( t) => ExprCompiled :: type_is ( expr, * t) ,
748
748
Builtin1 :: Not => ExprCompiled :: not ( span, expr) . node ,
749
- op => ExprCompiled :: Builtin1 ( op. clone ( ) , box expr) ,
749
+ op => ExprCompiled :: Builtin1 ( op. clone ( ) , Box :: new ( expr) ) ,
750
750
}
751
751
}
752
752
@@ -813,7 +813,7 @@ impl ExprCompiled {
813
813
if clauses. is_nop ( ) {
814
814
ExprCompiled :: Dict ( Vec :: new ( ) )
815
815
} else {
816
- ExprCompiled :: Compr ( ComprCompiled :: Dict ( box ( k, v) , clauses) )
816
+ ExprCompiled :: Compr ( ComprCompiled :: Dict ( Box :: new ( ( k, v) ) , clauses) )
817
817
}
818
818
}
819
819
}
@@ -857,7 +857,7 @@ impl ExprCompiled {
857
857
}
858
858
}
859
859
860
- ExprCompiled :: Builtin1 ( Builtin1 :: Dot ( field. clone ( ) ) , box object)
860
+ ExprCompiled :: Builtin1 ( Builtin1 :: Dot ( field. clone ( ) ) , Box :: new ( object) )
861
861
}
862
862
863
863
fn slice (
@@ -885,7 +885,7 @@ impl ExprCompiled {
885
885
}
886
886
}
887
887
}
888
- ExprCompiled :: Slice ( box ( array, start, stop, step) )
888
+ ExprCompiled :: Slice ( Box :: new ( ( array, start, stop, step) ) )
889
889
}
890
890
891
891
pub ( crate ) fn array_indirection (
@@ -901,7 +901,7 @@ impl ExprCompiled {
901
901
}
902
902
}
903
903
}
904
- ExprCompiled :: Builtin2 ( Builtin2 :: ArrayIndex , box ( array, index) )
904
+ ExprCompiled :: Builtin2 ( Builtin2 :: ArrayIndex , Box :: new ( ( array, index) ) )
905
905
}
906
906
907
907
pub ( crate ) fn typ ( span : FrozenFileSpan , v : IrSpanned < ExprCompiled > ) -> ExprCompiled {
@@ -923,7 +923,7 @@ impl ExprCompiled {
923
923
{
924
924
ExprCompiled :: Value ( StarlarkBool :: get_type_value_static ( ) . to_frozen_value ( ) )
925
925
}
926
- _ => ExprCompiled :: Call ( box IrSpanned {
926
+ _ => ExprCompiled :: Call ( Box :: new ( IrSpanned {
927
927
span,
928
928
node : CallCompiled {
929
929
fun : IrSpanned {
@@ -935,7 +935,7 @@ impl ExprCompiled {
935
935
..ArgsCompiledValue :: default ( )
936
936
} ,
937
937
} ,
938
- } ) ,
938
+ } ) ) ,
939
939
}
940
940
}
941
941
@@ -945,7 +945,7 @@ impl ExprCompiled {
945
945
v. to_value ( ) . get_type ( ) == t. as_str ( ) ,
946
946
) ) ;
947
947
}
948
- ExprCompiled :: Builtin1 ( Builtin1 :: TypeIs ( t) , box v )
948
+ ExprCompiled :: Builtin1 ( Builtin1 :: TypeIs ( t) , Box :: new ( v ) )
949
949
}
950
950
951
951
pub ( crate ) fn len ( span : FrozenFileSpan , arg : IrSpanned < ExprCompiled > ) -> ExprCompiled {
@@ -954,7 +954,7 @@ impl ExprCompiled {
954
954
return ExprCompiled :: Value ( FrozenValue :: new_int ( len) ) ;
955
955
}
956
956
}
957
- ExprCompiled :: Call ( box IrSpanned {
957
+ ExprCompiled :: Call ( Box :: new ( IrSpanned {
958
958
span,
959
959
node : CallCompiled {
960
960
fun : IrSpanned {
@@ -966,7 +966,7 @@ impl ExprCompiled {
966
966
..ArgsCompiledValue :: default ( )
967
967
} ,
968
968
} ,
969
- } )
969
+ } ) )
970
970
}
971
971
}
972
972
0 commit comments