We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b4eec2 commit 779dd80Copy full SHA for 779dd80
src/comp/middle/trans.rs
@@ -6425,7 +6425,8 @@ fn trans_block(&@block_ctxt cx, &ast::block b) -> result {
6425
ret r;
6426
} else {
6427
auto r_ty = ty::expr_ty(cx.fcx.lcx.ccx.tcx, e);
6428
- if (!ty::type_is_nil(cx.fcx.lcx.ccx.tcx, r_ty)) {
+ if (!ty::type_is_nil(cx.fcx.lcx.ccx.tcx, r_ty)
6429
+ && !ty::type_is_bot(cx.fcx.lcx.ccx.tcx, r_ty)) {
6430
// The value resulting from the block gets copied into an
6431
// alloca created in an outer scope and its refcount
6432
// bumped so that it can escape this block. This means
0 commit comments