summaryrefslogtreecommitdiff
path: root/src/hir/type.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-11-19 19:16:02 +0800
committerJohn Hodge <tpg@mutabah.net>2016-11-19 19:16:02 +0800
commit5fe7fcc580db497b267ca0f820e5d3268fe8aafb (patch)
tree0506ad3834f00d3dfaabe2a6c71aa660906b52e2 /src/hir/type.cpp
parentefa6da041f5ef34f5513e76d7c231353da6bf660 (diff)
downloadmrust-5fe7fcc580db497b267ca0f820e5d3268fe8aafb.tar.gz
HIR - Add Union type path binding
Diffstat (limited to 'src/hir/type.cpp')
-rw-r--r--src/hir/type.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/hir/type.cpp b/src/hir/type.cpp
index b430f2b5..1e67d60c 100644
--- a/src/hir/type.cpp
+++ b/src/hir/type.cpp
@@ -81,9 +81,10 @@ void ::HIR::TypeRef::fmt(::std::ostream& os) const
(Path,
os << e.path;
TU_MATCH(::HIR::TypeRef::TypePathBinding, (e.binding), (be),
- (Unbound, os << "/*U*/";),
+ (Unbound, os << "/*?*/";),
(Opaque, os << "/*O*/";),
(Struct, os << "/*S*/";),
+ (Union, os << "/*U*/";),
(Enum, os << "/*E*/";)
)
),
@@ -748,8 +749,9 @@ bool ::HIR::TypeRef::match_test_generics(const Span& sp, const ::HIR::TypeRef& x
TU_MATCH(::HIR::TypeRef::TypePathBinding, (*this), (e),
(Unbound, return ::HIR::TypeRef::TypePathBinding::make_Unbound({}); ),
(Opaque , return ::HIR::TypeRef::TypePathBinding::make_Opaque({}); ),
- (Struct , return ::HIR::TypeRef::TypePathBinding(e); ),
- (Enum , return ::HIR::TypeRef::TypePathBinding(e); )
+ (Struct, return ::HIR::TypeRef::TypePathBinding(e); ),
+ (Union , return ::HIR::TypeRef::TypePathBinding(e); ),
+ (Enum , return ::HIR::TypeRef::TypePathBinding(e); )
)
assert(!"Fell off end of clone_binding");
}