diff options
author | John Hodge <tpg@mutabah.net> | 2016-10-30 19:03:54 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-10-30 19:03:54 +0800 |
commit | e9fae2ebcd43b249e09079b0596e3338a04e1c99 (patch) | |
tree | 123e057a5b427c14a84828093450f169d25c4d38 /src/mir | |
parent | 1ad51e67d30f1cdac10f1574acc49de13a305398 (diff) | |
download | mrust-e9fae2ebcd43b249e09079b0596e3338a04e1c99.tar.gz |
HIR Typecheck - Rough support for box patterns
Diffstat (limited to 'src/mir')
-rw-r--r-- | src/mir/from_hir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp index 27c7d4cf..80915304 100644 --- a/src/mir/from_hir.cpp +++ b/src/mir/from_hir.cpp @@ -57,7 +57,7 @@ namespace { (Any, ), (Box, - TODO(sp, "Destructure using " << pat); + define_vars_from(sp, *e.sub); ), (Ref, define_vars_from(sp, *e.sub); @@ -168,7 +168,7 @@ namespace { (Any, ), (Box, - TODO(sp, "Destructure using Box - " << pat); + destructure_from_ex(sp, *e.sub, ::MIR::LValue::make_Deref({ box$( mv$(lval) ) }), allow_refutable); ), (Ref, destructure_from_ex(sp, *e.sub, ::MIR::LValue::make_Deref({ box$( mv$(lval) ) }), allow_refutable); |