public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Add get_item method for HIR::GroupedPattern
@ 2023-01-30 13:23 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-01-30 13:23 UTC (permalink / raw)
To: gcc-cvs
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 */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-30 13:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30 13:23 [gcc/devel/rust/master] Add get_item method for HIR::GroupedPattern Thomas Schwinge
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).