diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-03-09 15:35:18 +0000 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-03-09 18:18:35 +0000 |
commit | 01898e7cf2746e4dae0bee81ff5adfc1c00ae635 (patch) | |
tree | 9e8518e0c4d7f08511b9a0ae448e055a63fa1870 /gcc/rust/backend/rust-compile-implitem.h | |
parent | 0b35f5f10dc9d773b6cdaf60a30ce3e76d39bb35 (diff) | |
download | gcc-01898e7cf2746e4dae0bee81ff5adfc1c00ae635.zip gcc-01898e7cf2746e4dae0bee81ff5adfc1c00ae635.tar.gz gcc-01898e7cf2746e4dae0bee81ff5adfc1c00ae635.tar.bz2 |
Separate function definitions from function pointers.
Function definitions can have substations (generics) where as function
pointers cannot. These are distinct elements and their separation is
important to support wildcards (inference variables) on BareFunctionTypes.
To fix this the patch leverages the wrapper TyCtx which denotes a type that
must be infered.
Fixes #269
Diffstat (limited to 'gcc/rust/backend/rust-compile-implitem.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-implitem.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/backend/rust-compile-implitem.h b/gcc/rust/backend/rust-compile-implitem.h index 76cc608..1b6651a 100644 --- a/gcc/rust/backend/rust-compile-implitem.h +++ b/gcc/rust/backend/rust-compile-implitem.h @@ -110,7 +110,7 @@ public: // setup the params - TyTy::BaseType *tyret = fntype->return_type (); + TyTy::BaseType *tyret = fntype->get_return_type (); std::vector<Bvariable *> param_vars; size_t i = 0; @@ -273,7 +273,7 @@ public: ctx->insert_function_decl (method.get_mappings ().get_hirid (), fndecl); // setup the params - TyTy::BaseType *tyret = fntype->return_type (); + TyTy::BaseType *tyret = fntype->get_return_type (); std::vector<Bvariable *> param_vars; // insert self |