aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-base.h
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-11-05 11:38:05 +0000
committerGitHub <noreply@github.com>2021-11-05 11:38:05 +0000
commite73922ef9f07c511c383cc37532d0324a1138d99 (patch)
treecbb57b666f3a9907175d710134d6783f130e7049 /gcc/rust/backend/rust-compile-base.h
parent8e992e371bbd896c8b605e1ebade5cad80b1b411 (diff)
parentf4c200fcfec75b3841640263609d2133ead0c518 (diff)
downloadgcc-e73922ef9f07c511c383cc37532d0324a1138d99.zip
gcc-e73922ef9f07c511c383cc37532d0324a1138d99.tar.gz
gcc-e73922ef9f07c511c383cc37532d0324a1138d99.tar.bz2
Merge #794
794: Fix unhandled type bounds in TypeAlias r=philberty a=philberty This adds support for trait-object-types and desugars HIR::TraitObjectTypeOneBound into a single HIR::TraitObjectType. This also adds the missing cases of the generic arguments to the TypeBoundPredicates. It also contains cleanup for helpers used during monomorphization and a recursion limiter which is likely set too low but it is good enough for the test-cases we have now to get good back-traces. Fixes #786 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-base.h')
-rw-r--r--gcc/rust/backend/rust-compile-base.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-compile-base.h b/gcc/rust/backend/rust-compile-base.h
index d741598..3184e27 100644
--- a/gcc/rust/backend/rust-compile-base.h
+++ b/gcc/rust/backend/rust-compile-base.h
@@ -177,7 +177,6 @@ public:
virtual void visit (HIR::TraitObjectType &type) {}
virtual void visit (HIR::ParenthesisedType &type) {}
virtual void visit (HIR::ImplTraitTypeOneBound &type) {}
- virtual void visit (HIR::TraitObjectTypeOneBound &type) {}
virtual void visit (HIR::TupleType &type) {}
virtual void visit (HIR::NeverType &type) {}
virtual void visit (HIR::RawPointerType &type) {}
@@ -210,9 +209,12 @@ protected:
const TyTy::DynamicObjectType *ty,
Location locus);
- Bexpression *
- compute_address_for_trait_item (const Resolver::TraitItemReference *ref,
- const TyTy::BaseType *receiver);
+ Bexpression *compute_address_for_trait_item (
+ const Resolver::TraitItemReference *ref,
+ const TyTy::TypeBoundPredicate *predicate,
+ std::vector<std::pair<Resolver::TraitReference *, HIR::ImplBlock *>>
+ &receiver_bounds,
+ const TyTy::BaseType *receiver, const TyTy::BaseType *root, Location locus);
};
} // namespace Compile