From 08236689def47e7527c7dac84743a1b3308dcae0 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 11 Sep 2016 15:48:17 +0800 Subject: AST Dump - Fix incorrect error --- src/dump_as_rust.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/dump_as_rust.cpp') diff --git a/src/dump_as_rust.cpp b/src/dump_as_rust.cpp index 8c79c744..5200d4cc 100644 --- a/src/dump_as_rust.cpp +++ b/src/dump_as_rust.cpp @@ -688,7 +688,10 @@ void RustPrinter::handle_module(const AST::Module& mod) { TU_MATCH_DEF(AST::Item, (*it.data), (e), ( - throw ::std::runtime_error("Unexpected item type in impl block"); + throw ::std::runtime_error(FMT("Unexpected item type in impl block - " << it.data->tag_str())); + ), + (None, + // Ignore, it's been deleted by #[cfg] ), (Type, m_os << indent() << "type " << it.name << " = " << e.type() << ";\n"; -- cgit v1.2.3