diff options
Diffstat (limited to 'src/librustc_trans/trans/expr.rs')
| -rw-r--r-- | src/librustc_trans/trans/expr.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/librustc_trans/trans/expr.rs b/src/librustc_trans/trans/expr.rs index d2cbb9892f6..e73afc46174 100644 --- a/src/librustc_trans/trans/expr.rs +++ b/src/librustc_trans/trans/expr.rs @@ -656,6 +656,9 @@ fn trans_datum_unadjusted<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, let _icx = push_ctxt("trans_datum_unadjusted"); match expr.node { + hir::ExprType(ref e, _) => { + trans(bcx, &**e) + } hir::ExprPath(..) => { trans_def(bcx, expr, bcx.def(expr.id)) } @@ -941,6 +944,9 @@ fn trans_rvalue_stmt_unadjusted<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, hir::ExprBreak(label_opt) => { controlflow::trans_break(bcx, expr, label_opt.map(|l| l.node.name)) } + hir::ExprType(ref e, _) => { + trans_into(bcx, &**e, Ignore) + } hir::ExprAgain(label_opt) => { controlflow::trans_cont(bcx, expr, label_opt.map(|l| l.node.name)) } @@ -1064,6 +1070,9 @@ fn trans_rvalue_dps_unadjusted<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, debuginfo::set_source_location(bcx.fcx, expr.id, expr.span); match expr.node { + hir::ExprType(ref e, _) => { + trans_into(bcx, &**e, dest) + } hir::ExprPath(..) => { trans_def_dps_unadjusted(bcx, expr, bcx.def(expr.id), dest) } |
