summaryrefslogtreecommitdiff
path: root/src/hir/from_ast.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-09 09:15:48 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-09 09:15:48 +0800
commit5d75ae0b19803ee79d191cd985b5e8896df51ccb (patch)
tree782f3d65fdb21b58ebcf15d95934980c5283eea8 /src/hir/from_ast.cpp
parent42d954bae579c9a72543a5ade61061f1b0cdcd08 (diff)
downloadmrust-5d75ae0b19803ee79d191cd985b5e8896df51ccb.tar.gz
HIR - Save/load macro source crate
Diffstat (limited to 'src/hir/from_ast.cpp')
-rw-r--r--src/hir/from_ast.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp
index 275e5845..c62cc6b9 100644
--- a/src/hir/from_ast.cpp
+++ b/src/hir/from_ast.cpp
@@ -1304,16 +1304,16 @@ public:
auto& macros = rv.m_exported_macros;
// - Extract macros from root module
- for( /*const*/ auto& mac : crate.m_root_module.macros() ) {
- //if( mac.data.export ) {
- macros.insert( ::std::make_pair( mac.name, mv$(mac.data) ) );
- //}
- }
for( auto& mac : crate.m_root_module.macro_imports_res() ) {
//if( mac.data->export ) {
macros.insert( ::std::make_pair( mac.name, MacroRulesPtr(new MacroRules( mv$(*const_cast<MacroRules*>(mac.data)) )) ) );
//}
}
+ for( /*const*/ auto& mac : crate.m_root_module.macros() ) {
+ //if( mac.data.export ) {
+ macros.insert( ::std::make_pair( mac.name, mv$(mac.data) ) );
+ //}
+ }
auto sp = Span();
// - Store the lang item paths so conversion code can use them.