summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-07-16 15:15:32 +0800
committerJohn Hodge <tpg@mutabah.net>2016-07-16 15:15:32 +0800
commit4647df8723e286ef9783db6b88caa72ebecff130 (patch)
tree6ab46ea98d7729f95c65b1b699a53f94922f9a69 /src/include
parent994058985d7946dad24393a6f267f33d0b86a5fd (diff)
downloadmrust-4647df8723e286ef9783db6b88caa72ebecff130.tar.gz
HIR Typecheck - HACK: Correct trait type selection with evil
Diffstat (limited to 'src/include')
-rw-r--r--src/include/span.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/span.hpp b/src/include/span.hpp
index 881c34df..35d59f42 100644
--- a/src/include/span.hpp
+++ b/src/include/span.hpp
@@ -66,7 +66,7 @@ Spanned<T> make_spanned(Span sp, T val) {
#define ERROR(span, code, msg) do { ::Span(span).error(code, [&](::std::ostream& os) { os << msg; }); throw ::std::runtime_error("Error fell through" #code); } while(0)
#define WARNING(span, code, msg) do { ::Span(span).warning(code, [&](::std::ostream& os) { os << msg; }); } while(0)
-#define BUG(span, msg) do { ::Span(span).bug([&](::std::ostream& os) { os << msg; }); throw ::std::runtime_error("Bug fell through"); } while(0)
-#define TODO(span, msg) do { const char* __TODO_func = __func__; ::Span(span).bug([&](::std::ostream& os) { os << "TODO: " << __TODO_func << " - " << msg; }); throw ::std::runtime_error("Bug (todo) fell through"); } while(0)
+#define BUG(span, msg) do { ::Span(span).bug([&](::std::ostream& os) { os << __FILE__ << ":" << __LINE__ << ": " << msg; }); throw ::std::runtime_error("Bug fell through"); } while(0)
+#define TODO(span, msg) do { const char* __TODO_func = __func__; ::Span(span).bug([&](::std::ostream& os) { os << __FILE__ << ":" << __LINE__ << ": TODO: " << __TODO_func << " - " << msg; }); throw ::std::runtime_error("Bug (todo) fell through"); } while(0)
#define ASSERT_BUG(span, cnd, msg) do { if( !(cnd) ) { ::Span(span).bug([&](::std::ostream& os) { os << "ASSERT FAIL: " #cnd << ": " << msg; }); throw ::std::runtime_error("Bug fell through"); } } while(0)