diff options
author | John Hodge <tpg@mutabah.net> | 2016-09-28 10:35:32 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-09-28 10:35:32 +0800 |
commit | e7bae8f3f2188c6b04e4f4d62e898275f072a6e3 (patch) | |
tree | d3bb27250ec99c65389da6a0852bf4fe3e2395c0 /src/resolve/use.cpp | |
parent | 9ba41a54e44ae2f107a8646364353b06a7776bb5 (diff) | |
download | mrust-e7bae8f3f2188c6b04e4f4d62e898275f072a6e3.tar.gz |
AST - Make anon modules `shared_ptr`s to handle case where a block is depeted
Diffstat (limited to 'src/resolve/use.cpp')
-rw-r--r-- | src/resolve/use.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve/use.cpp b/src/resolve/use.cpp index 44d50516..c2079bdd 100644 --- a/src/resolve/use.cpp +++ b/src/resolve/use.cpp @@ -256,7 +256,8 @@ void Resolve_Use_Mod(const ::AST::Crate& crate, ::AST::Module& mod, ::AST::Path if( idx >= mod.anon_mods().size() ) { BUG(span, "Invalid anon path segment '" << des_item_name << "'"); } - return ::AST::PathBinding::make_Module({mod.anon_mods()[idx]}); + assert( mod.anon_mods()[idx] ); + return ::AST::PathBinding::make_Module({&*mod.anon_mods()[idx]}); } // Seach for the name defined in the module. |