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 type resolution for grouped patterns Date: Mon, 30 Jan 2023 13:23:58 +0000 (GMT) [thread overview] Message-ID: <20230130132358.2F6693858D32@sourceware.org> (raw) https://gcc.gnu.org/g:01a07f7d3959ec8bd4474a6081ebae4454c1a229 commit 01a07f7d3959ec8bd4474a6081ebae4454c1a229 Author: Owen Avery <powerboat9.gamer@gmail.com> Date: Wed Jan 11 11:56:05 2023 -0500 Add type resolution for grouped patterns Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com> Diff: --- gcc/rust/typecheck/rust-hir-type-check-pattern.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gcc/rust/typecheck/rust-hir-type-check-pattern.cc b/gcc/rust/typecheck/rust-hir-type-check-pattern.cc index 9bff8e31aee..2a033ba5191 100644 --- a/gcc/rust/typecheck/rust-hir-type-check-pattern.cc +++ b/gcc/rust/typecheck/rust-hir-type-check-pattern.cc @@ -387,10 +387,12 @@ TypeCheckPattern::visit (HIR::IdentifierPattern &) } void -TypeCheckPattern::visit (HIR::GroupedPattern &) +TypeCheckPattern::visit (HIR::GroupedPattern &pattern) { - // TODO - gcc_unreachable (); + TyTy::BaseType *inner_ty + = TypeCheckPattern::Resolve (pattern.get_item ().get (), parent); + infered = inner_ty->clone (); + infered->set_ref (pattern.get_pattern_mappings ().get_hirid ()); } void
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=20230130132358.2F6693858D32@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).