diff options
author | Philip Herron <herron.philip@googlemail.com> | 2025-04-03 15:37:40 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-04-08 10:17:13 +0200 |
commit | 0f37641978a2ef2b7a50d230a16637a3cfd46c2d (patch) | |
tree | 71de6dbf7b1cf6bf7cb785740aad89a5db052d60 /gcc/rust/hir/tree/rust-hir-expr.h | |
parent | f388cac59df2704026b6a0585efba70154640b12 (diff) | |
download | gcc-0f37641978a2ef2b7a50d230a16637a3cfd46c2d.zip gcc-0f37641978a2ef2b7a50d230a16637a3cfd46c2d.tar.gz gcc-0f37641978a2ef2b7a50d230a16637a3cfd46c2d.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/hir/tree/rust-hir-expr.h')
0 files changed, 0 insertions, 0 deletions