diff options
author | John Hodge <tpg@mutabah.net> | 2018-05-20 22:01:59 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-05-20 22:01:59 +0800 |
commit | de9ecd7a2d70359b34e77ded57e5aa9284345ac5 (patch) | |
tree | 29ab42c6c06960720bd67f0b8ebaec807ad0284e /src/resolve | |
parent | 134be5198993096ab5216b6d52a8937430c733b0 (diff) | |
download | mrust-de9ecd7a2d70359b34e77ded57e5aa9284345ac5.tar.gz |
AST - Refactor lifetime/HRB handling
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/absolute.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/resolve/absolute.cpp b/src/resolve/absolute.cpp index 2c17592c..d05e3bc6 100644 --- a/src/resolve/absolute.cpp +++ b/src/resolve/absolute.cpp @@ -1500,24 +1500,24 @@ void Resolve_Absolute_Type(Context& context, TypeRef& type) ) TU_IFLET(::AST::PathBinding, e.path.binding(), Trait, be, - auto ty = ::TypeRef( type.span(), {}, ::make_vec1(mv$(e.path)) ); + auto ty = ::TypeRef( type.span(), ::make_vec1(Type_TraitPath { {}, mv$(e.path)}), {} ); type = mv$(ty); return ; ) ), (TraitObject, - //context.push_lifetimes( e.hrls ); for(auto& trait : e.traits) { - Resolve_Absolute_Path(context, type.span(), Context::LookupMode::Type, trait); + //context.push_lifetimes( trait.hrbs.m_lifetimes ); + Resolve_Absolute_Path(context, type.span(), Context::LookupMode::Type, trait.path); + //context.pop_lifetimes(); } - //context.pop_lifetimes(); ), (ErasedType, - //context.push_lifetimes( e.hrls ); for(auto& trait : e.traits) { - Resolve_Absolute_Path(context, type.span(), Context::LookupMode::Type, trait); + //context.push_lifetimes( trait.hrbs.m_lifetimes ); + Resolve_Absolute_Path(context, type.span(), Context::LookupMode::Type, trait.path); + //context.pop_lifetimes(); } - //context.pop_lifetimes(); ) ) } @@ -1683,6 +1683,8 @@ void Resolve_Absolute_Generic(Context& context, ::AST::GenericParams& params) for( auto& bound : params.bounds() ) { TU_MATCH(::AST::GenericBound, (bound), (e), + (None, + ), (Lifetime, // TODO: Link lifetime names to params ), |