diff options
| author | Brian Anderson <[email protected]> | 2011-04-02 19:12:00 -0400 |
|---|---|---|
| committer | Brian Anderson <[email protected]> | 2011-04-02 20:35:51 -0400 |
| commit | 99901bdbc435fdf6768b392c171204dd7281162b (patch) | |
| tree | b159b6e88c45be826311d3b7a9b2cbce42d827fa /src | |
| parent | Join the results of alt arms so alt can be used as an expression. (diff) | |
| download | rust-99901bdbc435fdf6768b392c171204dd7281162b.tar.xz rust-99901bdbc435fdf6768b392c171204dd7281162b.zip | |
Add FIXMEs around type handling in trans_if, trans_alt
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp/middle/trans.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 809a268a..2e4f1d85 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -3086,6 +3086,7 @@ fn trans_if(@block_ctxt cx, @ast.expr cond, // If we have an else expression, then the entire // if expression can have a non-nil type. + // FIXME: This isn't quite right, particularly re: dynamic types auto expr_ty = ty.expr_ty(elexpr); if (ty.type_has_dynamic_size(expr_ty)) { expr_llty = T_typaram_ptr(cx.fcx.ccx.tn); @@ -3576,6 +3577,7 @@ fn trans_alt(@block_ctxt cx, @ast.expr expr, auto default_res = trans_fail(default_cx, expr.span, "non-exhaustive match failure"); + // FIXME: This isn't quite right, particularly re: dynamic types auto expr_ty = ty.ann_to_type(ann); auto expr_llty; if (ty.type_has_dynamic_size(expr_ty)) { |