summaryrefslogtreecommitdiff
path: root/src/hir/from_ast.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-06-09 09:54:57 +0800
committerJohn Hodge <tpg@mutabah.net>2016-06-09 09:54:57 +0800
commit502cc9c8dc1941877b35e45d742a3e36264671ca (patch)
tree5ff1f49577673035d7e4d9ff951884e6e979c3f1 /src/hir/from_ast.cpp
parent7685ecc25ad47d369ea250d36c71bae4cec2d9a1 (diff)
downloadmrust-502cc9c8dc1941877b35e45d742a3e36264671ca.tar.gz
HIR - Save and use paths to #[lang] items
Diffstat (limited to 'src/hir/from_ast.cpp')
-rw-r--r--src/hir/from_ast.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp
index 3f297e89..6c873e1e 100644
--- a/src/hir/from_ast.cpp
+++ b/src/hir/from_ast.cpp
@@ -1028,6 +1028,12 @@ public:
LowerHIR_Module_Impls(crate.m_root_module, rv);
+ auto sp = Span();
+ for( const auto& lang_item_path : crate.m_lang_items )
+ {
+ rv.m_lang_items.insert( ::std::make_pair(lang_item_path.first, LowerHIR_SimplePath(sp, lang_item_path.second)) );
+ }
+
// Set all pointers in the HIR to the correct (now fixed) locations
IndexVisitor(rv).visit_crate( rv );