public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #839
@ 2022-06-08 11:57 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 11:57 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:a8a345642a2a150a35b68e2f19b90abf105700c5
commit a8a345642a2a150a35b68e2f19b90abf105700c5
Merge: e8d91e9e082 45edfc2b265
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date: Thu Dec 16 15:23:39 2021 +0000
Merge #839
839: Add typechecking for match-expr r=philberty a=philberty
This adds in the type checking pass for the match expression including static
analysis for errors such as:
- error[E0532]: expected tuple struct or tuple variant, found struct variant `Foo::D`
- error[E0027]: pattern does not mention fields `x`, `y`
- error[E0026]: variant `Foo::D` does not have a field named `b`
- error[E0532]: expected tuple struct or tuple variant, found struct variant `Foo::D`
Addresses #190
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diff:
gcc/rust/Make-lang.in | 1 +
gcc/rust/hir/tree/rust-hir-expr.h | 25 ++-
gcc/rust/resolve/rust-ast-resolve-pattern.cc | 10 +-
gcc/rust/typecheck/rust-hir-type-check-expr.h | 58 ++++++
gcc/rust/typecheck/rust-hir-type-check-pattern.cc | 223 ++++++++++++++++++++++
gcc/rust/typecheck/rust-hir-type-check-pattern.h | 60 ++++++
gcc/rust/typecheck/rust-tyty.h | 15 ++
gcc/testsuite/rust/compile/match1.rs | 16 ++
gcc/testsuite/rust/compile/match2.rs | 15 ++
gcc/testsuite/rust/compile/match3.rs | 16 ++
gcc/testsuite/rust/compile/match4.rs | 16 ++
gcc/testsuite/rust/compile/match5.rs | 15 ++
gcc/testsuite/rust/compile/torture/match1.rs | 16 ++
13 files changed, 474 insertions(+), 12 deletions(-)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-08 11:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 11:57 [gcc/devel/rust/master] Merge #839 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).