summaryrefslogtreecommitdiff
path: root/src/hir/expr_ptr.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-06-04 12:33:35 +0800
committerJohn Hodge <tpg@mutabah.net>2016-06-04 12:33:35 +0800
commite33d210a4a85e91abe04f1874f460b6e60c6b5e0 (patch)
tree96668e07ac5972f3f25b1a5369831a0edea3ea35 /src/hir/expr_ptr.hpp
parentef9d2edb3752a19b827240e91ef3fea7bc354586 (diff)
downloadmrust-e33d210a4a85e91abe04f1874f460b6e60c6b5e0.tar.gz
Byte string literals in AST, infrastructure for coercions
Diffstat (limited to 'src/hir/expr_ptr.hpp')
-rw-r--r--src/hir/expr_ptr.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/hir/expr_ptr.hpp b/src/hir/expr_ptr.hpp
index 0dcc300a..6378b052 100644
--- a/src/hir/expr_ptr.hpp
+++ b/src/hir/expr_ptr.hpp
@@ -19,8 +19,17 @@ public:
{
x.node = nullptr;
}
+ ExprPtr& operator=(ExprPtr&& x)
+ {
+ this->~ExprPtr();
+ node = x.node;
+ x.node = nullptr;
+ return *this;
+ }
~ExprPtr();
+ ::std::unique_ptr< ::HIR::ExprNode> into_unique();
+
::HIR::ExprNode& operator*() { return *node; }
const ::HIR::ExprNode& operator*() const { return *node; }
::HIR::ExprNode* operator->() { return node; }