summaryrefslogtreecommitdiff
path: root/src/resolve/absolute.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-05-29 22:30:28 +0800
committerJohn Hodge <tpg@mutabah.net>2016-05-29 22:30:28 +0800
commit7890a6dba8fcdb9454b2e58ea1363f270d2da2c5 (patch)
treefa51d39712f552c78b390d61d19793c737d5238a /src/resolve/absolute.cpp
parent73bcd2fb0bda8f939a6c1385b419a67ad8eeef2c (diff)
downloadmrust-7890a6dba8fcdb9454b2e58ea1363f270d2da2c5.tar.gz
Parse/AST/HIR - Support Enum::Var(..) and Struct { .. } patters properly
Diffstat (limited to 'src/resolve/absolute.cpp')
-rw-r--r--src/resolve/absolute.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resolve/absolute.cpp b/src/resolve/absolute.cpp
index 5137aca6..05fa7523 100644
--- a/src/resolve/absolute.cpp
+++ b/src/resolve/absolute.cpp
@@ -1082,8 +1082,10 @@ void Resolve_Absolute_Pattern(Context& context, bool allow_refutable, ::AST::Pa
for(auto& sp : e.sub_patterns)
Resolve_Absolute_Pattern(context, allow_refutable, sp);
),
+ (WildcardStructTuple,
+ Resolve_Absolute_Path(context, pat.span(), Context::LookupMode::Pattern, e.path);
+ ),
(StructTuple,
- // TODO: This isn't a type lookup, it's a pattern lookup (allowing imported enum variants, e.g. `Some(_)` to work)
Resolve_Absolute_Path(context, pat.span(), Context::LookupMode::Pattern, e.path);
for(auto& sp : e.sub_patterns)
Resolve_Absolute_Pattern(context, allow_refutable, sp);