diff options
author | John Hodge <tpg@mutabah.net> | 2018-05-27 11:33:04 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-05-27 11:33:04 +0800 |
commit | af1ec8a893d33aa974186d06498d0fc81d22ae7b (patch) | |
tree | 294ad6c81512df1901af85df5e563db2a98c33c7 /src/ast/types.hpp | |
parent | 84392bea7f6f0754f61d5b424129eb5fa809674d (diff) | |
download | mrust-af1ec8a893d33aa974186d06498d0fc81d22ae7b.tar.gz |
AST - Include HRBs on fn() types, fix minor parsing bug
Diffstat (limited to 'src/ast/types.hpp')
-rw-r--r-- | src/ast/types.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ast/types.hpp b/src/ast/types.hpp index 1c06593c..22465593 100644 --- a/src/ast/types.hpp +++ b/src/ast/types.hpp @@ -96,6 +96,7 @@ struct TypeArgRef struct Type_Function { + AST::HigherRankedBounds hrbs; bool is_unsafe; ::std::string m_abi; ::std::unique_ptr<TypeRef> m_rettype; @@ -103,7 +104,8 @@ struct Type_Function bool is_variadic; Type_Function() {} - Type_Function(bool is_unsafe, ::std::string abi, ::std::unique_ptr<TypeRef> ret, ::std::vector<TypeRef> args, bool is_variadic): + Type_Function(AST::HigherRankedBounds hrbs, bool is_unsafe, ::std::string abi, ::std::unique_ptr<TypeRef> ret, ::std::vector<TypeRef> args, bool is_variadic): + hrbs(mv$(hrbs)), is_unsafe(is_unsafe), m_abi(mv$(abi)), m_rettype(mv$(ret)), @@ -239,9 +241,9 @@ public: m_data(TypeData::make_Tuple({::std::move(inner_types)})) {} struct TagFunction {}; - TypeRef(TagFunction, Span sp, bool is_unsafe, ::std::string abi, ::std::vector<TypeRef> args, bool is_variadic, TypeRef ret): + TypeRef(TagFunction, Span sp, AST::HigherRankedBounds hrbs, bool is_unsafe, ::std::string abi, ::std::vector<TypeRef> args, bool is_variadic, TypeRef ret): m_span(mv$(sp)), - m_data(TypeData::make_Function({ Type_Function( is_unsafe, abi, box$(ret), mv$(args), is_variadic ) })) + m_data(TypeData::make_Function({ Type_Function( mv$(hrbs), is_unsafe, abi, box$(ret), mv$(args), is_variadic ) })) {} struct TagReference {}; |