summaryrefslogtreecommitdiff
path: root/src/hir/type.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-05-23 22:16:29 +0800
committerJohn Hodge <tpg@mutabah.net>2016-05-23 22:16:29 +0800
commitb96c1a08cec9be6cc29f47eb151c3ad91075a819 (patch)
treefaf4259c8d8e59c7433a0dfca7313d0c7c686f5b /src/hir/type.hpp
parent1f9a4180a3b54f85f37919ba4ca709f8e8250bb6 (diff)
downloadmrust-b96c1a08cec9be6cc29f47eb151c3ad91075a819.tar.gz
HIR - Add type alias replacement. Other related changes below
- Added pretty printing for HIR paths and types - Added a sub-pass to resolve/index that makes all index paths point at the actual item (no imports involved) - Split up some contents of main_bindings.hpp
Diffstat (limited to 'src/hir/type.hpp')
-rw-r--r--src/hir/type.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hir/type.hpp b/src/hir/type.hpp
index 95a3cd1d..06535dfb 100644
--- a/src/hir/type.hpp
+++ b/src/hir/type.hpp
@@ -24,6 +24,8 @@ enum class CoreType
Bool,
Char, Str,
};
+extern ::std::ostream& operator<<(::std::ostream& os, const CoreType& ct);
+
enum class BorrowType
{
Shared,
@@ -103,8 +105,14 @@ struct TypeRef
TypeRef(::HIR::Path p):
m_data( Data::make_Path(mv$(p)) )
{}
+
+ TypeRef clone() const;
+
+ void fmt(::std::ostream& os) const;
};
+extern ::std::ostream& operator<<(::std::ostream& os, const ::HIR::TypeRef& ty);
+
} // namespace HIR
#endif