summaryrefslogtreecommitdiff
path: root/src/hir/type.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-05-26 11:04:04 +0800
committerJohn Hodge <tpg@mutabah.net>2016-05-26 11:04:04 +0800
commit81d89041e8500d9f6dfab9c55aee76967a5233f1 (patch)
tree26452d9973421d917921548e1b2b63950a6ca52b /src/hir/type.cpp
parentdd7680bc0d53f02e4b96b2b3896ebea16742c9bb (diff)
downloadmrust-81d89041e8500d9f6dfab9c55aee76967a5233f1.tar.gz
HIR Cosnt Eval - Initial work, hits TODOs
Diffstat (limited to 'src/hir/type.cpp')
-rw-r--r--src/hir/type.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hir/type.cpp b/src/hir/type.cpp
index 2bbfafa8..6863cd12 100644
--- a/src/hir/type.cpp
+++ b/src/hir/type.cpp
@@ -65,6 +65,9 @@ void ::HIR::TypeRef::fmt(::std::ostream& os) const
(Array,
os << "[" << *e.inner << "; " << "/*sz*/" << "]";
),
+ (Slice,
+ os << "[" << *e.inner << "]";
+ ),
(Tuple,
os << "(";
for(const auto& t : e)
@@ -131,6 +134,11 @@ void ::HIR::TypeRef::fmt(::std::ostream& os) const
// /* huh */
// }) );
),
+ (Slice,
+ return ::HIR::TypeRef( Data::make_Slice({
+ box$( e.inner->clone() )
+ }) );
+ ),
(Tuple,
::std::vector< ::HIR::TypeRef> types;
for(const auto& t : e)