]>
git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Fix segv in unsafe chcker
Trait constants were missing type resolution step, this adds that
as if it was a normal constant. The unsafe checker was missing a
null check.
Fixes Rust-GCC#3612
gcc/rust/ChangeLog:
* checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): add null check
* hir/tree/rust-hir-item.h: add has_type helper
* typecheck/rust-hir-trait-resolve.cc (TraitItemReference::resolve_item):
add missing type checking
gcc/testsuite/ChangeLog:
* rust/compile/issue-3612.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>