diff options
author | Philip Herron <herron.philip@googlemail.com> | 2023-04-20 16:56:46 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:34:15 +0100 |
commit | 0a0b51c5dc0453df4876cbd9c4e528d1faaf37ed (patch) | |
tree | 568b9344c3721869fd55793ac8d6f31a2219cb86 /gcc/rust/Make-lang.in | |
parent | 46eb2b751f1cbcab35972e57abcecc31b13d0889 (diff) | |
download | gcc-0a0b51c5dc0453df4876cbd9c4e528d1faaf37ed.zip gcc-0a0b51c5dc0453df4876cbd9c4e528d1faaf37ed.tar.gz gcc-0a0b51c5dc0453df4876cbd9c4e528d1faaf37ed.tar.bz2 |
gccrs: Extract helper lookup_associated_impl_block
This will look for a specified predicate that is associated with it so we
might have the predicate Foo<u16, i32> which would refer to:
impl Foo<i32> for u16 {}
This is a general helper which can be used in several places.
gcc/rust/ChangeLog:
* typecheck/rust-hir-trait-reference.cc (AssociatedImplTrait::AssociatedImplTrait):
bind the predicate
(AssociatedImplTrait::get_trait): remove
(AssociatedImplTrait::get_predicate): new getter
* typecheck/rust-hir-trait-reference.h: bind predicate
* typecheck/rust-hir-type-check-item.cc: update ctor
* typecheck/rust-type-util.cc (lookup_associated_impl_block): new function
* typecheck/rust-type-util.h (class BaseType): remove unused forward decl
(lookup_associated_impl_block): new helper
* typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::is_equal): new
* typecheck/rust-tyty-subst.cc (SubstitutionRef::lookup_associated_impl): use new helper
(SubstitutionRef::monomorphize): update usage/error handling
* typecheck/rust-tyty-subst.h: remove old prototype
* typecheck/rust-tyty.h: add is_equal decl
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/Make-lang.in')
0 files changed, 0 insertions, 0 deletions