summaryrefslogtreecommitdiff
path: root/src/mir/helpers.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-12-10 08:49:30 +0800
committerJohn Hodge <tpg@mutabah.net>2016-12-10 08:49:30 +0800
commit48c1ed15bfd4bd5fcc30c3015483e4336dc05c63 (patch)
tree3f1a3b9ff590963aeb89c015f76b2d44878e01cd /src/mir/helpers.hpp
parentea14a914748484fba06afebe4eb5c110d4b425d7 (diff)
downloadmrust-48c1ed15bfd4bd5fcc30c3015483e4336dc05c63.tar.gz
HIR->MIR - Destructuring CoerceUnsized
Diffstat (limited to 'src/mir/helpers.hpp')
-rw-r--r--src/mir/helpers.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mir/helpers.hpp b/src/mir/helpers.hpp
index 2a4f81d5..aef012a7 100644
--- a/src/mir/helpers.hpp
+++ b/src/mir/helpers.hpp
@@ -27,9 +27,9 @@ struct CheckFailure:
{
};
-#define MIR_BUG(state, ...) ( (state).print_bug( [&](auto& _os){_os << __VA_ARGS__; } ) )
+#define MIR_BUG(state, ...) do { (state).print_bug( [&](auto& _os){_os << __VA_ARGS__; } ); throw ""; } while(0)
#define MIR_ASSERT(state, cnd, ...) do { if( !(cnd) ) (state).print_bug( [&](auto& _os){_os << "ASSERT " #cnd " failed - " << __VA_ARGS__; } ); } while(0)
-#define MIR_TODO(state, ...) ( (state).print_todo( [&](auto& _os){_os << __VA_ARGS__; } ) )
+#define MIR_TODO(state, ...) do { (state).print_todo( [&](auto& _os){_os << __VA_ARGS__; } ); throw ""; } while(0)
class TypeResolve
{
@@ -38,8 +38,8 @@ public:
private:
const unsigned int STMT_TERM = ~0u;
- const Span& sp;
public:
+ const Span& sp;
const ::StaticTraitResolve& m_resolve;
const ::HIR::Crate& m_crate;
private: