aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-expr.h
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2025-04-02 21:02:44 +0100
committerPhilip Herron <philip.herron@embecosm.com>2025-04-04 08:19:30 +0000
commit8022ca11ed991cba51843c3226e4de9c2b795ecc (patch)
treea391150055591aa9dceb54e233bae4b4af6ab6f8 /gcc/rust/ast/rust-expr.h
parent314090971a51037bb77e36b46c7a10652b9e6c3f (diff)
downloadgcc-8022ca11ed991cba51843c3226e4de9c2b795ecc.zip
gcc-8022ca11ed991cba51843c3226e4de9c2b795ecc.tar.gz
gcc-8022ca11ed991cba51843c3226e4de9c2b795ecc.tar.bz2
gccrs: Fix ICE when hitting invalid types for generics
We need to check upfront if the type is valid or not. Then error with a decent message. Fixes Rust-GCC#3643 Fixes Rust-GCC#3646 Fixes Rust-GCC#3654 Fixes Rust-GCC#3663 Fixes Rust-GCC#3671 gcc/rust/ChangeLog: * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): fix error msg * typecheck/rust-substitution-mapper.cc (SubstMapper::Resolve): add validation (SubstMapper::valid_type): new check (SubstMapper::visit): check if can resolve * typecheck/rust-substitution-mapper.h: new prototype gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: nr2 is missing type path error * rust/compile/issue-3643.rs: New test. * rust/compile/issue-3646.rs: New test. * rust/compile/issue-3654.rs: New test. * rust/compile/issue-3663.rs: New test. * rust/compile/issue-3671.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