diff options
author | Philip Herron <herron.philip@googlemail.com> | 2025-04-03 15:37:40 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2025-04-03 16:40:33 +0000 |
commit | 002c349b6d0f8c12d26beaff178785524f155583 (patch) | |
tree | 66f3006c26577fda51424dee288fffda24e88462 /gcc/rust/ast/rust-expr.h | |
parent | 67017c92b8cb51064243c9c76b0fafe3c80e17b2 (diff) | |
download | gcc-002c349b6d0f8c12d26beaff178785524f155583.zip gcc-002c349b6d0f8c12d26beaff178785524f155583.tar.gz gcc-002c349b6d0f8c12d26beaff178785524f155583.tar.bz2 |
gccrs: Fix ICE on invalid match arms
We hit assertions on empty enum or unknown variant, this catches the error
and emits a new diagnostic.
Fixes Rust-GCC#3656
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): emit error
gcc/testsuite/ChangeLog:
* rust/compile/issue-3656.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/ast/rust-expr.h')
0 files changed, 0 insertions, 0 deletions