summaryrefslogtreecommitdiff
path: root/src/hir_conv/constant_evaluation.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-08-14 22:09:22 +0800
committerJohn Hodge <tpg@mutabah.net>2016-08-14 22:09:22 +0800
commit4dfe5c315498ef816baa3c62e36bc0d72cff50a9 (patch)
treeaae657d43c099d1709f24931f6185c9a59b73be2 /src/hir_conv/constant_evaluation.cpp
parent6f390a1f245d467ef8f2aa7c9e0ad7b300a4e681 (diff)
downloadmrust-4dfe5c315498ef816baa3c62e36bc0d72cff50a9.tar.gz
HIR - Move borrow ops to their own node type
Diffstat (limited to 'src/hir_conv/constant_evaluation.cpp')
-rw-r--r--src/hir_conv/constant_evaluation.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/hir_conv/constant_evaluation.cpp b/src/hir_conv/constant_evaluation.cpp
index 43e1eff3..53997e20 100644
--- a/src/hir_conv/constant_evaluation.cpp
+++ b/src/hir_conv/constant_evaluation.cpp
@@ -322,10 +322,6 @@ namespace {
switch(node.m_op)
{
- case ::HIR::ExprNode_UniOp::Op::Ref:
- case ::HIR::ExprNode_UniOp::Op::RefMut:
- TODO(node.span(), "&/&mut in constant");
- break;
case ::HIR::ExprNode_UniOp::Op::Invert:
TU_MATCH_DEF(::HIR::Literal, (val), (e),
( throw ""; ),
@@ -342,6 +338,9 @@ namespace {
break;
}
}
+ void visit(::HIR::ExprNode_Borrow& node) override {
+ TODO(node.span(), "&/&mut in constant");
+ }
void visit(::HIR::ExprNode_Cast& node) override {
TRACE_FUNCTION_F("_Cast");
node.m_value->visit(*this);