Skip to content
Draft
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions gcc/rust/ast/rust-ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,12 @@ class Pattern : public Visitable
return std::unique_ptr<Pattern> (clone_pattern_impl ());
}

// Unique pointer custom reconstruct function
std::unique_ptr<Pattern> reconstruct () const
{
return reconstruct_base (this);
}

virtual Kind get_pattern_kind () = 0;

// possible virtual methods: is_refutable()
Expand All @@ -1443,6 +1449,7 @@ class Pattern : public Visitable

virtual location_t get_locus () const = 0;
virtual NodeId get_node_id () const = 0;
virtual Pattern *reconstruct_impl () const = 0;

protected:
// Clone pattern implementation as pure virtual method
Expand Down
Loading
Loading