summaryrefslogtreecommitdiff
path: root/src/hir/type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hir/type.cpp')
-rw-r--r--src/hir/type.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/hir/type.cpp b/src/hir/type.cpp
index 57e57c16..7a833a32 100644
--- a/src/hir/type.cpp
+++ b/src/hir/type.cpp
@@ -36,6 +36,16 @@ namespace HIR {
assert(!"Bad CoreType value");
return os;
}
+ ::std::ostream& operator<<(::std::ostream& os, const BorrowType& bt)
+ {
+ switch(bt)
+ {
+ case BorrowType::Owned: return os << "Owned";
+ case BorrowType::Unique: return os << "Unique";
+ case BorrowType::Shared: return os << "Shared";
+ }
+ return os;
+ }
}
void ::HIR::TypeRef::fmt(::std::ostream& os) const