diff options
| author | Philip Herron <herron.philip@googlemail.com> | 2025-11-09 22:05:58 +0000 |
|---|---|---|
| committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-11-17 15:58:19 +0100 |
| commit | 93430462afaee6bbb501174794fd060661f0f653 (patch) | |
| tree | 142c8e0d6533c349d7caf9ce8a67d3518b0b9570 /libjava/classpath/java | |
| parent | 792ce42cd3d44cc854c4fd389698abca35a1a039 (diff) | |
gccrs: Fix segv in errors in type checking an impl item
When we typecheck a trait impl block item, at the end we validate it
against the trait definition by doing a final unify but if the type check
fails on the the impl item it returns NULL here. The other issue was that
if we fail to resolve the specified lifetime we return error early, this
changes the typechecking to default to an anon lifetime so we can continue
typechecking.
Fixes Rust-GCC#4188
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-implitem.cc (TypeCheckImplItemWithTrait::visit): null guard
* typecheck/rust-hir-type-check.cc (TraitItemReference::get_type_from_fn): default to anon
gcc/testsuite/ChangeLog:
* rust/compile/issue-4188.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'libjava/classpath/java')
0 files changed, 0 insertions, 0 deletions
