diff options
author | Philip Herron <herron.philip@googlemail.com> | 2025-04-17 13:50:55 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2025-04-18 14:01:15 +0000 |
commit | f81ec04bfde4e771998b44dd5c685069d1229652 (patch) | |
tree | 9a976c3a47b4164cf555245a95577eb7c6c33bde /gcc/tree.h | |
parent | 0a34f7bb91855ac95c51219c89d4049c4d69f7b3 (diff) | |
download | gcc-f81ec04bfde4e771998b44dd5c685069d1229652.zip gcc-f81ec04bfde4e771998b44dd5c685069d1229652.tar.gz gcc-f81ec04bfde4e771998b44dd5c685069d1229652.tar.bz2 |
gccrs: Fix ICE when handling case of unknown field in HIR::FieldAccess
We were wrongly adding the assertion that this must not be an enum but
this is a pointless assertion we only care that there are variant in the
ADT and if the field exists in the first variant.
Fixes Rust-GCC#3581
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): fix bad assertion
gcc/testsuite/ChangeLog:
* rust/compile/nonexistent-field.rs: fix bad error message
* rust/compile/issue-3581-1.rs: New test.
* rust/compile/issue-3581-2.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/tree.h')
0 files changed, 0 insertions, 0 deletions