@@ -843,7 +843,7 @@ class StructPatternElements
843
843
// bool has_struct_pattern_fields;
844
844
std::vector<std::unique_ptr<StructPatternField>> fields;
845
845
846
- bool has_struct_pattern_etc ;
846
+ bool has_rest_pattern ;
847
847
std::vector<Attribute> struct_pattern_etc_attrs;
848
848
// StructPatternEtc etc;
849
849
@@ -859,29 +859,29 @@ class StructPatternElements
859
859
* no etc). */
860
860
bool is_empty () const
861
861
{
862
- return !has_struct_pattern_fields () && !has_struct_pattern_etc ;
862
+ return !has_struct_pattern_fields () && !has_rest_pattern ;
863
863
}
864
864
865
- bool has_etc () const { return has_struct_pattern_etc ; }
865
+ bool has_rest () const { return has_rest_pattern ; }
866
866
867
867
// Constructor for StructPatternElements with both (potentially)
868
868
StructPatternElements (
869
869
std::vector<std::unique_ptr<StructPatternField>> fields,
870
870
std::vector<Attribute> etc_attrs)
871
- : fields (std::move (fields)), has_struct_pattern_etc (true ),
871
+ : fields (std::move (fields)), has_rest_pattern (true ),
872
872
struct_pattern_etc_attrs (std::move (etc_attrs))
873
873
{}
874
874
875
875
// Constructor for StructPatternElements with no StructPatternEtc
876
876
StructPatternElements (
877
877
std::vector<std::unique_ptr<StructPatternField>> fields)
878
- : fields (std::move (fields)), has_struct_pattern_etc (false ),
878
+ : fields (std::move (fields)), has_rest_pattern (false ),
879
879
struct_pattern_etc_attrs ()
880
880
{}
881
881
882
882
// Copy constructor with vector clone
883
883
StructPatternElements (StructPatternElements const &other)
884
- : has_struct_pattern_etc (other.has_struct_pattern_etc ),
884
+ : has_rest_pattern (other.has_rest_pattern ),
885
885
struct_pattern_etc_attrs (other.struct_pattern_etc_attrs)
886
886
{
887
887
fields.reserve (other.fields .size ());
@@ -893,7 +893,7 @@ class StructPatternElements
893
893
StructPatternElements &operator = (StructPatternElements const &other)
894
894
{
895
895
struct_pattern_etc_attrs = other.struct_pattern_etc_attrs ;
896
- has_struct_pattern_etc = other.has_struct_pattern_etc ;
896
+ has_rest_pattern = other.has_rest_pattern ;
897
897
898
898
fields.clear ();
899
899
fields.reserve (other.fields .size ());
@@ -938,7 +938,7 @@ class StructPatternElements
938
938
939
939
void strip_etc ()
940
940
{
941
- has_struct_pattern_etc = false ;
941
+ has_rest_pattern = false ;
942
942
struct_pattern_etc_attrs.clear ();
943
943
struct_pattern_etc_attrs.shrink_to_fit ();
944
944
}
0 commit comments