summaryrefslogtreecommitdiff
path: root/src/hir/expr.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hir/expr.hpp')
-rw-r--r--src/hir/expr.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/hir/expr.hpp b/src/hir/expr.hpp
index 137377d7..f69429f6 100644
--- a/src/hir/expr.hpp
+++ b/src/hir/expr.hpp
@@ -22,6 +22,16 @@ enum class ValueUsage {
// Value is moved
Move,
};
+static inline ::std::ostream& operator<<(::std::ostream& os, const ValueUsage& x) {
+ switch(x)
+ {
+ case ValueUsage::Unknown: os << "Unknown"; break;
+ case ValueUsage::Borrow: os << "Borrow"; break;
+ case ValueUsage::Mutate: os << "Mutate"; break;
+ case ValueUsage::Move: os << "Move"; break;
+ }
+ return os;
+}
class GenericParams;