From 9c5fd80efca12e1be08e0c4efad920eab794daa4 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 29 Aug 2016 12:57:03 +0800 Subject: HIR From AST - Add TODO for extern crate --- src/hir/from_ast.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp index e015dbae..b99cc0cf 100644 --- a/src/hir/from_ast.cpp +++ b/src/hir/from_ast.cpp @@ -987,6 +987,8 @@ void _add_mod_val_item(::HIR::Module& mod, ::std::string name, bool is_pub, ::H (Crate, // TODO: All 'extern crate' items should be normalised into a list in the crate root // - If public, add a namespace import here referring to the root of the imported crate + TODO(Span(), "Handle `extern crate` in HIR lower"); + _add_mod_ns_item( mod, item.name, item.is_pub, ::HIR::TypeItem::make_Import( ::HIR::SimplePath(e.name, {}) ) ); ), (Type, _add_mod_ns_item( mod, item.name, item.is_pub, ::HIR::TypeItem::make_TypeAlias( LowerHIR_TypeAlias(e) ) ); -- cgit v1.2.3