diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-02-05 00:56:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-05 00:56:44 +0000 |
commit | 8f1fce4916520b7ee9a97d2bb4f25d25fd94a626 (patch) | |
tree | fb2b8f475720233153b06864ffd4d5fc72ed35df /gcc/rust/backend | |
parent | 47a9a9e949d7660ae7fc7cd4642f668bf438c970 (diff) | |
parent | 6d7a7b22882433d46bf4e4efe8c43343892c91eb (diff) | |
download | gcc-8f1fce4916520b7ee9a97d2bb4f25d25fd94a626.zip gcc-8f1fce4916520b7ee9a97d2bb4f25d25fd94a626.tar.gz gcc-8f1fce4916520b7ee9a97d2bb4f25d25fd94a626.tar.bz2 |
Merge #1739
1739: Initial type bounds checking for all type checks r=philberty a=philberty
This patchset is my branch for general improvements to the type-system and
for improved type bounds checking in preparation for opaque types.
Fixes #1773 #1786
Co-authored-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc index 76d70cc..1890b57 100644 --- a/gcc/rust/backend/rust-compile-expr.cc +++ b/gcc/rust/backend/rust-compile-expr.cc @@ -26,6 +26,7 @@ #include "rust-compile-block.h" #include "rust-compile-implitem.h" #include "rust-constexpr.h" +#include "rust-unify.h" #include "rust-gcc.h" #include "fold-const.h" @@ -2006,7 +2007,10 @@ CompileExpr::resolve_method_address (TyTy::FnType *fntype, HirId ref, { TyTy::BaseType *infer_impl_call = candidate_call->infer_substitions (expr_locus); - monomorphized = infer_impl_call->unify (fntype); + monomorphized = Resolver::UnifyRules::Resolve ( + TyTy::TyWithLocation (infer_impl_call), + TyTy::TyWithLocation (fntype), expr_locus, true /* commit */, + true /* emit_errors */); } return CompileInherentImplItem::Compile (impl_item, ctx, monomorphized); |