aboutsummaryrefslogtreecommitdiff
path: root/gcc/context.cc
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2024-10-02 15:47:33 +0100
committerPhilip Herron <philip.herron@embecosm.com>2024-10-02 16:42:01 +0000
commitaf0f0e3f5384457cecb74608476caf2acd1c5ebc (patch)
treee1171dd837b4f165832c9294b0760a7ad1d403d9 /gcc/context.cc
parentad1c8b1d45ef20e51acef313723bb5b12c58e457 (diff)
downloadgcc-af0f0e3f5384457cecb74608476caf2acd1c5ebc.zip
gcc-af0f0e3f5384457cecb74608476caf2acd1c5ebc.tar.gz
gcc-af0f0e3f5384457cecb74608476caf2acd1c5ebc.tar.bz2
gccrs: Fix ICE when typechecking non-trait item when we expect one
We just had an assertion here for this case where we expect a trait. This changes the assertion into error handling producing the correct error code with fixit suggestion like rustc. Fixes #2499 gcc/rust/ChangeLog: * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_path_to_trait): use error handling instead of assertion * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): reuse trait reference * typecheck/rust-hir-type-check-item.h: update prototype gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: nr2 cant handle this * rust/compile/issue-2499.rs: New test. Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/context.cc')
0 files changed, 0 insertions, 0 deletions