From: Owen Avery <powerboat9.ga...@gmail.com> gcc/rust/ChangeLog:
* hir/tree/rust-hir-pattern.h: Add get_item method. Signed-off-by: Owen Avery <powerboat9.ga...@gmail.com> --- gcc/rust/hir/tree/rust-hir-pattern.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/rust/hir/tree/rust-hir-pattern.h b/gcc/rust/hir/tree/rust-hir-pattern.h index 80fa9b791a7..b7a230c526f 100644 --- a/gcc/rust/hir/tree/rust-hir-pattern.h +++ b/gcc/rust/hir/tree/rust-hir-pattern.h @@ -1269,6 +1269,12 @@ public: return PatternType::GROUPED; } + std::unique_ptr<Pattern> &get_item () { return pattern_in_parens; } + const std::unique_ptr<Pattern> &get_item () const + { + return pattern_in_parens; + } + protected: /* Use covariance to implement clone function as returning this object rather * than base */ -- 2.40.0