aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2024-10-02 15:47:33 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-19 15:32:16 +0100
commit308fd792af6c220b505515e6d40e7ba0f9820cf5 (patch)
tree3eebb2a7582f269c94bdac1353a093639518199e /gcc/rust/backend
parentac5821890051d71cf55169c4f7e91801ca5f8ba2 (diff)
downloadgcc-308fd792af6c220b505515e6d40e7ba0f9820cf5.zip
gcc-308fd792af6c220b505515e6d40e7ba0f9820cf5.tar.gz
gcc-308fd792af6c220b505515e6d40e7ba0f9820cf5.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/rust/backend')
0 files changed, 0 insertions, 0 deletions