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] Merge #1279 Date: Wed, 8 Jun 2022 12:49:59 +0000 (GMT) [thread overview] Message-ID: <20220608124959.59378388B595@sourceware.org> (raw) https://gcc.gnu.org/g:79d977e759b073a0a4d422b9a1032427ddc05295 commit 79d977e759b073a0a4d422b9a1032427ddc05295 Merge: d09b135116f ec9a03a03b5 Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Wed May 25 11:21:26 2022 +0000 Merge #1279 1279: Implement type checking for the `IfLet` expression. r=philberty a=antego Addresses #1177. This change implements the type check for the `IfLet` expression. This is the adapted type checking code from the `MatchExpr`. Tested on this code ``` enum E { X(u8), } fn main() -> i32 { let mut res = 0; let v = E::X(4); if let E::X(n) = v { res = n; } 0 } ``` Compilation finishes without errors. Next is the implementation of the code generation but I'll need help to find where it's located. Co-authored-by: antego <antego@users.noreply.github.com> Diff: gcc/rust/hir/tree/rust-hir-expr.h | 13 +++++++++++++ gcc/rust/typecheck/rust-hir-type-check-expr.h | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+)
reply other threads:[~2022-06-08 12:49 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=20220608124959.59378388B595@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).