gccrs: Support type resolution on super traits on dyn objects
authorPhilip Herron <philip.herron@embecosm.com>
Thu, 6 Oct 2022 13:46:17 +0000 (14:46 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 21 Feb 2023 11:36:33 +0000 (12:36 +0100)
commit13556413e3841460d88c7a63c8a3049399f6b28e
tree469f314c188b78f915cf1d508dd64ed9632d125c
parent522197469179e786e59202a40f2adf9dd95c8ddd
gccrs: Support type resolution on super traits on dyn objects

When checking if specified bounds satisfy other bounds we must lookup the
super traits. To finish the support for super traits we need to redo the
computation of method addresses to support super traits.

Addresses #914

gcc/rust/ChangeLog:

* backend/rust-compile.cc: Add note about missing support for super
traits.
* typecheck/rust-tyty.cc (BaseType::satisfies_bound): New function.
(BaseType::bounds_compatible): New function.
(DynamicObjectType::get_object_items): New function.
* typecheck/rust-hir-trait-ref.h: Use new API to perform type resolution
on dyn objects.
gcc/rust/backend/rust-compile.cc
gcc/rust/typecheck/rust-hir-trait-ref.h
gcc/rust/typecheck/rust-tyty.cc