Skip to content

Commit a513dc3

Browse files
committed
---
yaml --- r: 282028 b: refs/heads/stable c: eb43d95 h: refs/heads/master
1 parent c015578 commit a513dc3

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: 3c795e08d6f4a532f12f3f8e1837db5e0647f8b0
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: d3a6d67fb85c766d58c3097ef8c880e468e25478
32+
refs/heads/stable: eb43d952118f8d33e221c00f71a343f32ce17655
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/librustc_trans/trans/mir/rvalue.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,12 @@ impl<'bcx, 'tcx> MirContext<'bcx, 'tcx> {
248248
let r_t_out = CastTy::from_ty(cast_ty).expect("bad output type for cast");
249249
let ll_t_in = type_of::immediate_type_of(bcx.ccx(), operand.ty);
250250
let ll_t_out = type_of::immediate_type_of(bcx.ccx(), cast_ty);
251-
let (llval, ll_t_in, signed) = if let CastTy::Int(IntTy::CEnum) = r_t_in {
251+
let llval = operand.immediate();
252+
let signed = if let CastTy::Int(IntTy::CEnum) = r_t_in {
252253
let repr = adt::represent_type(bcx.ccx(), operand.ty);
253-
let llval = operand.immediate();
254-
let discr = bcx.with_block(|bcx| {
255-
adt::trans_get_discr(bcx, &repr, llval, None, true)
256-
});
257-
(discr, common::val_ty(discr), adt::is_discr_signed(&repr))
254+
adt::is_discr_signed(&repr)
258255
} else {
259-
(operand.immediate(), ll_t_in, operand.ty.is_signed())
256+
operand.ty.is_signed()
260257
};
261258

262259
let newval = match (r_t_in, r_t_out) {

0 commit comments

Comments
 (0)