Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename cloning methods in TupleStructItems and TuplePatternItems #2661

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions gcc/rust/hir/tree/rust-hir-pattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ class TupleStructItems : public FullVisitable
// Unique pointer custom clone function
std::unique_ptr<TupleStructItems> clone_tuple_struct_items () const
{
return std::unique_ptr<TupleStructItems> (clone_tuple_struct_items_impl ());
return std::unique_ptr<TupleStructItems> (clone_tuple_items_impl ());
}

virtual std::string as_string () const = 0;
Expand All @@ -805,7 +805,7 @@ class TupleStructItems : public FullVisitable

protected:
// pure virtual clone implementation
virtual TupleStructItems *clone_tuple_struct_items_impl () const = 0;
virtual TupleStructItems *clone_tuple_items_impl () const = 0;
};

// Class for non-ranged tuple struct pattern patterns
Expand Down Expand Up @@ -857,7 +857,7 @@ class TupleStructItemsNoRange : public TupleStructItems
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
TupleStructItemsNoRange *clone_tuple_struct_items_impl () const override
TupleStructItemsNoRange *clone_tuple_items_impl () const override
{
return new TupleStructItemsNoRange (*this);
}
Expand Down Expand Up @@ -936,7 +936,7 @@ class TupleStructItemsRange : public TupleStructItems
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
TupleStructItemsRange *clone_tuple_struct_items_impl () const override
TupleStructItemsRange *clone_tuple_items_impl () const override
{
return new TupleStructItemsRange (*this);
}
Expand Down Expand Up @@ -1027,8 +1027,7 @@ class TuplePatternItems : public FullVisitable
// Unique pointer custom clone function
std::unique_ptr<TuplePatternItems> clone_tuple_pattern_items () const
{
return std::unique_ptr<TuplePatternItems> (
clone_tuple_pattern_items_impl ());
return std::unique_ptr<TuplePatternItems> (clone_tuple_items_impl ());
}

virtual std::string as_string () const = 0;
Expand All @@ -1037,7 +1036,7 @@ class TuplePatternItems : public FullVisitable

protected:
// pure virtual clone implementation
virtual TuplePatternItems *clone_tuple_pattern_items_impl () const = 0;
virtual TuplePatternItems *clone_tuple_items_impl () const = 0;
};

// Class representing TuplePattern patterns where there are multiple patterns
Expand Down Expand Up @@ -1092,7 +1091,7 @@ class TuplePatternItemsMultiple : public TuplePatternItems
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
TuplePatternItemsMultiple *clone_tuple_pattern_items_impl () const override
TuplePatternItemsMultiple *clone_tuple_items_impl () const override
{
return new TuplePatternItemsMultiple (*this);
}
Expand Down Expand Up @@ -1174,7 +1173,7 @@ class TuplePatternItemsRanged : public TuplePatternItems
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
TuplePatternItemsRanged *clone_tuple_pattern_items_impl () const override
TuplePatternItemsRanged *clone_tuple_items_impl () const override
{
return new TuplePatternItemsRanged (*this);
}
Expand Down
Loading