summaryrefslogtreecommitdiff
path: root/src/resolve/index.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-31 10:01:41 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-31 10:01:41 +0800
commitfc7239e7271e879102272ea4d7e98f87f027ee84 (patch)
tree8134b59f26d6901b0eefc7709bb4ad40afda7f11 /src/resolve/index.cpp
parentea043a43eeff8512396afc166ca1d0085873c57d (diff)
downloadmrust-fc7239e7271e879102272ea4d7e98f87f027ee84.tar.gz
All - Rough support for `union` (data structure present in all stages)
Diffstat (limited to 'src/resolve/index.cpp')
-rw-r--r--src/resolve/index.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/resolve/index.cpp b/src/resolve/index.cpp
index 09d3909b..c65327b0 100644
--- a/src/resolve/index.cpp
+++ b/src/resolve/index.cpp
@@ -130,6 +130,10 @@ void Resolve_Index_Module_Base(const AST::Crate& crate, AST::Module& mod)
p.bind( ::AST::PathBinding::make_Enum({&e}) );
_add_item_type(i.data.span, mod, i.name, i.is_pub, mv$(p));
),
+ (Union,
+ p.bind( ::AST::PathBinding::make_Union({&e}) );
+ _add_item_type(i.data.span, mod, i.name, i.is_pub, mv$(p));
+ ),
(Trait,
p.bind( ::AST::PathBinding::make_Trait({&e}) );
_add_item_type(i.data.span, mod, i.name, i.is_pub, mv$(p));
@@ -194,6 +198,7 @@ void Resolve_Index_Module_Base(const AST::Crate& crate, AST::Module& mod)
(Crate , _add_item(sp, mod, IndexName::Namespace, i.name, i.is_pub, i_data.path, !allow_collide); ),
(Module, _add_item(sp, mod, IndexName::Namespace, i.name, i.is_pub, i_data.path, !allow_collide); ),
(Enum, _add_item_type(sp, mod, i.name, i.is_pub, i_data.path, !allow_collide); ),
+ (Union, _add_item_type(sp, mod, i.name, i.is_pub, i_data.path, !allow_collide); ),
(Trait, _add_item_type(sp, mod, i.name, i.is_pub, i_data.path, !allow_collide); ),
(TypeAlias,_add_item_type(sp, mod, i.name, i.is_pub, i_data.path, !allow_collide); ),
@@ -286,6 +291,9 @@ void Resolve_Index_Module_Wildcard__glob_in_hir_mod(const Span& sp, const AST::C
(Struct,
p.bind( ::AST::PathBinding::make_Struct({nullptr, &e}) );
),
+ (Union,
+ p.bind( ::AST::PathBinding::make_Union({nullptr, &e}) );
+ ),
(Enum,
p.bind( ::AST::PathBinding::make_Enum({nullptr}) );
),