Skip to content

Commit 4024f2c

Browse files
committed
Fixes compilation error with latest nightly rust (1.18.0-nightly (9f2abad 2017-04-18))
1 parent 6f2fe14 commit 4024f2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/enum_clike.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
4444
let variant = &var.node;
4545
if let Some(body_id) = variant.disr_expr {
4646
use rustc_const_eval::*;
47-
let constcx = ConstContext::new(cx.tcx, body_id);
47+
let constcx = ConstContext::with_tables(cx.tcx, cx.tcx.body_tables(body_id));
4848
let bad = match constcx.eval(&cx.tcx.hir.body(body_id).value) {
4949
Ok(ConstVal::Integral(Usize(Us64(i)))) => i as u32 as u64 != i,
5050
Ok(ConstVal::Integral(Isize(Is64(i)))) => i as i32 as i64 != i,

0 commit comments

Comments
 (0)