summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-09-12 09:39:44 +0800
committerJohn Hodge <tpg@mutabah.net>2016-09-12 09:39:44 +0800
commit7ab01ff3df9f14ca877633ab9f5aef4ed6c31f6b (patch)
treee6b5c68390b7d86ae34cca4e0d882db31c6c9abd
parentd1b9ffeed07a3b8846b79a6ba6247b8c320efaf0 (diff)
downloadmrust-7ab01ff3df9f14ca877633ab9f5aef4ed6c31f6b.tar.gz
HIR From AST - Allow None items in impl blocks
-rw-r--r--src/hir/from_ast.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp
index bf0f39b8..aabfc3ef 100644
--- a/src/hir/from_ast.cpp
+++ b/src/hir/from_ast.cpp
@@ -1136,6 +1136,8 @@ void LowerHIR_Module_Impls(const ::AST::Module& ast_mod, ::HIR::Crate& hir_crat
(
ERROR(item.data->span, E0000, "Unexpected item type in trait impl");
),
+ (None,
+ ),
// TODO: Associated constants
(Type,
DEBUG("- type " << item.name);
@@ -1191,6 +1193,8 @@ void LowerHIR_Module_Impls(const ::AST::Module& ast_mod, ::HIR::Crate& hir_crat
(
ERROR(item.data->span, E0000, "Unexpected item type in inherent impl");
),
+ (None,
+ ),
(Function,
methods.insert( ::std::make_pair(item.name, ::HIR::TypeImpl::VisImplEnt< ::HIR::Function> { item.is_pub, item.is_specialisable, LowerHIR_Function(item_path, e, type) } ) );
)