Skip to content

Commit 465f727

Browse files
committed
---
yaml --- r: 193389 b: refs/heads/beta c: 46de12a h: refs/heads/master i: 193387: ebcf2fb v: v3
1 parent 17360e3 commit 465f727

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 5d950bd37d9f4ef46798b79d38d9d91927bb0cf4
34+
refs/heads/beta: 46de12ad0064e7879b1d8ce07e96e1e31274b881
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: de8a23bbc3a7b9cbd7574b5b91a34af59bf030e6

branches/beta/src/librustc_trans/trans/consts.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,9 @@ fn const_expr_unadjusted<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
462462

463463
ast::ExprIndex(ref base, ref index) => {
464464
let (bv, bt) = const_expr(cx, &**base, param_substs);
465-
let iv = match const_eval::eval_const_expr(cx.tcx(), &**index) {
466-
const_eval::const_int(i) => i as u64,
467-
const_eval::const_uint(u) => u,
465+
let iv = match const_eval::eval_const_expr_partial(cx.tcx(), &**index, None) {
466+
Ok(const_eval::const_int(i)) => i as u64,
467+
Ok(const_eval::const_uint(u)) => u,
468468
_ => cx.sess().span_bug(index.span,
469469
"index is not an integer-constant expression")
470470
};
@@ -650,9 +650,9 @@ fn const_expr_unadjusted<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
650650
ast::ExprRepeat(ref elem, ref count) => {
651651
let unit_ty = ty::sequence_element_type(cx.tcx(), ety);
652652
let llunitty = type_of::type_of(cx, unit_ty);
653-
let n = match const_eval::eval_const_expr(cx.tcx(), &**count) {
654-
const_eval::const_int(i) => i as uint,
655-
const_eval::const_uint(i) => i as uint,
653+
let n = match const_eval::eval_const_expr_partial(cx.tcx(), &**count, None) {
654+
Ok(const_eval::const_int(i)) => i as uint,
655+
Ok(const_eval::const_uint(i)) => i as uint,
656656
_ => cx.sess().span_bug(count.span, "count must be integral const expression.")
657657
};
658658
let unit_val = const_expr(cx, &**elem, param_substs).0;

0 commit comments

Comments
 (0)