summaryrefslogtreecommitdiff
path: root/src/include/span.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-03-08 11:41:47 +0800
committerJohn Hodge <tpg@mutabah.net>2016-03-08 11:41:47 +0800
commitd631637ae467843ffd969c6003b6c187f498ef5c (patch)
tree71a1908002656186152f8421e6c3a52aca846e31 /src/include/span.hpp
parent8438c45edf9ee1b561ccfec304d2a36b0671e311 (diff)
downloadmrust-d631637ae467843ffd969c6003b6c187f498ef5c.tar.gz
Spans on MacroInvocation, re-enable span in ERROR reporting
Diffstat (limited to 'src/include/span.hpp')
-rw-r--r--src/include/span.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/span.hpp b/src/include/span.hpp
index 7603b080..49169e5b 100644
--- a/src/include/span.hpp
+++ b/src/include/span.hpp
@@ -59,7 +59,7 @@ struct Spanned
T m_item;
};
-#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 ERROR(span, code, msg) do { (span).error(code, [&](::std::ostream& os) { os << msg; }); throw ::std::runtime_error("Error fell through" #code); } while(0)
#define BUG(span, msg) do { (span).bug([&](::std::ostream& os) { os << msg; }); throw ::std::runtime_error("Bug fell through"); } while(0)
#define TODO(span, msg) do { (span).bug([&](::std::ostream& os) { os << "TODO: " << msg; }); throw ::std::runtime_error("Bug (todo) fell through"); } while(0)