public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Add get_item method for HIR::GroupedPattern Date: Mon, 30 Jan 2023 13:23:53 +0000 (GMT) [thread overview] Message-ID: <20230130132353.1E4A23858D28@sourceware.org> (raw) https://gcc.gnu.org/g:248316afc36984015b2674e15dac0c6d40c50b87 commit 248316afc36984015b2674e15dac0c6d40c50b87 Author: Owen Avery <powerboat9.gamer@gmail.com> Date: Wed Jan 25 13:00:38 2023 -0500 Add get_item method for HIR::GroupedPattern Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com> Diff: --- 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 7129b5a3684..d994e37c2a2 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 */
reply other threads:[~2023-01-30 13:23 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230130132353.1E4A23858D28@sourceware.org \ --to=tschwinge@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).