diff options
author | John Hodge <tpg@mutabah.net> | 2016-10-23 15:26:53 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-10-23 15:26:53 +0800 |
commit | 2bf4e8bfeb83f135f9429256e301673c1a63ce09 (patch) | |
tree | 16b53658f313b9381620f3639802df895527f184 /src/resolve/absolute.cpp | |
parent | dfec5021812ae61d56fc376f7556726d79c4d48e (diff) | |
download | mrust-2bf4e8bfeb83f135f9429256e301673c1a63ce09.tar.gz |
AST - Reduce places where there's no span information provided
Diffstat (limited to 'src/resolve/absolute.cpp')
-rw-r--r-- | src/resolve/absolute.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resolve/absolute.cpp b/src/resolve/absolute.cpp index f466a40f..4a4ac5cb 100644 --- a/src/resolve/absolute.cpp +++ b/src/resolve/absolute.cpp @@ -156,7 +156,7 @@ struct Context return e->clone(); } else { - return ::TypeRef("Self", 0xFFFF); + return ::TypeRef(Span(), "Self", 0xFFFF); } ) ) @@ -822,7 +822,7 @@ namespace { for(const auto& typ : e.m_params.m_types) { (void)typ; - trait_path.nodes().back().args().m_types.push_back( ::TypeRef() ); + trait_path.nodes().back().args().m_types.push_back( ::TypeRef(sp) ); } } trait_path.bind( ::AST::PathBinding::make_Trait({nullptr, &e}) ); @@ -848,7 +848,7 @@ namespace { new_path = ::AST::Path(::AST::Path::TagUfcs(), ::TypeRef(sp, mv$(trait_path))); } else { - new_path = ::AST::Path(::AST::Path::TagUfcs(), ::TypeRef(), mv$(trait_path)); + new_path = ::AST::Path(::AST::Path::TagUfcs(), ::TypeRef(sp), mv$(trait_path)); } for( unsigned int j = i+1; j < path_abs.nodes.size(); j ++ ) new_path.nodes().push_back( mv$(path_abs.nodes[j]) ); @@ -1093,14 +1093,14 @@ void Resolve_Absolute_Path_BindAbsolute(Context& context, const Span& sp, Contex for(const auto& typ : e.trait_->params().ty_params()) { (void)typ; - trait_path.nodes().back().args().m_types.push_back( ::TypeRef() ); + trait_path.nodes().back().args().m_types.push_back( ::TypeRef(sp) ); } } else { for(const auto& typ : e.hir->m_params.m_types) { (void)typ; - trait_path.nodes().back().args().m_types.push_back( ::TypeRef() ); + trait_path.nodes().back().args().m_types.push_back( ::TypeRef(sp) ); } } } @@ -1136,7 +1136,7 @@ void Resolve_Absolute_Path_BindAbsolute(Context& context, const Span& sp, Contex new_path = ::AST::Path(::AST::Path::TagUfcs(), ::TypeRef(sp, mv$(trait_path))); } else { - new_path = ::AST::Path(::AST::Path::TagUfcs(), ::TypeRef(), mv$(trait_path)); + new_path = ::AST::Path(::AST::Path::TagUfcs(), ::TypeRef(sp), mv$(trait_path)); } for( unsigned int j = i+1; j < path_abs.nodes.size(); j ++ ) new_path.nodes().push_back( mv$(path_abs.nodes[j]) ); |