Skip to content

Commit e646188

Browse files
committed
librustc: Remove match arm since we don't allow enum to float casts.
1 parent 7cce75f commit e646188

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc/middle/trans/consts.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,7 @@ fn const_expr_unadjusted(cx: &CrateContext, e: &ast::Expr,
484484
if ty::type_is_signed(ety) { llvm::LLVMConstFPToSI(v, llty.to_ref()) }
485485
else { llvm::LLVMConstFPToUI(v, llty.to_ref()) }
486486
}
487-
(expr::cast_enum, expr::cast_integral) |
488-
(expr::cast_enum, expr::cast_float) => {
487+
(expr::cast_enum, expr::cast_integral) => {
489488
let repr = adt::represent_type(cx, basety);
490489
let discr = adt::const_get_discrim(cx, &*repr, v);
491490
let iv = C_integral(cx.int_type, discr, false);

0 commit comments

Comments
 (0)