Rustup to 2018-05-13

This commit is contained in:
Philipp Hansch
2018-05-13 10:44:57 +02:00
parent 18a5b90242
commit 26b48bbdfc
4 changed files with 10 additions and 10 deletions

View File

@@ -61,7 +61,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ArrayIndexing {
// Array with known size can be checked statically
let ty = cx.tables.expr_ty(array);
if let ty::TyArray(_, size) = ty.sty {
let size = size.val.to_raw_bits().unwrap();
let size = size.assert_usize(cx.tcx).unwrap().into();
// Index is a constant uint
if let Some((Constant::Int(const_index), _)) = constant(cx, index) {