summaryrefslogtreecommitdiff
path: root/src/mir/from_hir_match.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-12-14 22:33:02 +0800
committerJohn Hodge <tpg@mutabah.net>2016-12-14 22:33:02 +0800
commit2a45f78605089afebfaf628aac50fc5fd51dfb25 (patch)
treef3bc7e7c0118c7f9990a50b7859d0ca8e81607a5 /src/mir/from_hir_match.cpp
parentdb8c101b11d5f7a926144ccdb8d156fa11944d2a (diff)
downloadmrust-2a45f78605089afebfaf628aac50fc5fd51dfb25.tar.gz
Consteval - Re-enabled full first-pass consteval
Diffstat (limited to 'src/mir/from_hir_match.cpp')
-rw-r--r--src/mir/from_hir_match.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mir/from_hir_match.cpp b/src/mir/from_hir_match.cpp
index c26dbc41..68f4f24b 100644
--- a/src/mir/from_hir_match.cpp
+++ b/src/mir/from_hir_match.cpp
@@ -2156,7 +2156,8 @@ namespace
const char* name, const field_path_t& field_path, ::std::function<void(DecisionTreeNode::Branch&)> and_then
)
{
- ASSERT_BUG(sp, ve_start < ve_end, "Range pattern with one value - " << ve_start << "..." << ve_end);
+ ASSERT_BUG(sp, ve_start != ve_end, "Range pattern with one value - " << ve_start);
+ ASSERT_BUG(sp, ve_start < ve_end, "Range pattern with a start after the end - " << ve_start << "..." << ve_end);
TRACE_FUNCTION_F("[" << FMT_CB(os, for(const auto& i:be) os << i.first <<" , ";) << "]");
// - Find the first entry that ends after the new one starts.