]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/array_indexing.rs
update to the rust-PR that unblocks clippy
[rust.git] / clippy_lints / src / array_indexing.rs
index 4d8f3de5e046bf91fa1f1ae1be0516f34421ee75..399f93d08c7cd419641f715efa4e534db03fe83b 100644 (file)
@@ -55,11 +55,11 @@ fn get_lints(&self) -> LintArray {
     }
 }
 
-impl LateLintPass for ArrayIndexing {
-    fn check_expr(&mut self, cx: &LateContext, e: &hir::Expr) {
+impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ArrayIndexing {
+    fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx hir::Expr) {
         if let hir::ExprIndex(ref array, ref index) = e.node {
             // Array with known size can be checked statically
-            let ty = cx.tcx.expr_ty(array);
+            let ty = cx.tcx.tables().expr_ty(array);
             if let ty::TyArray(_, size) = ty.sty {
                 let size = ConstInt::Infer(size as u64);