]> git.lizzy.rs Git - rust.git/commitdiff
rustup
authorManish Goregaokar <manishsmail@gmail.com>
Wed, 7 Jan 2015 04:05:34 +0000 (09:35 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Wed, 7 Jan 2015 04:05:34 +0000 (09:35 +0530)
src/misc.rs
src/types.rs

index d69a7db0f55f243df1f75df27df88aeee0b6f92c..763c78bf278907296a2eca92c56b9e10c4963205 100644 (file)
@@ -3,7 +3,7 @@
 use syntax::ast::*;
 use syntax::visit::{FnKind};
 use rustc::lint::{Context, LintPass, LintArray, Lint, Level};
-use rustc::middle::ty::{mod, expr_ty, ty_str, ty_ptr, ty_rptr};
+use rustc::middle::ty::{self, expr_ty, ty_str, ty_ptr, ty_rptr};
 use syntax::codemap::Span;
 
 use types::span_note_and_lint;
index 8754c1348b146d96e7546257b9b1709666f9c7d5..17f030c950ff4c3d0861ec950d86d7b732339a68 100644 (file)
@@ -57,7 +57,7 @@ fn check_ty(&mut self, cx: &Context, ty: &ast::Ty) {
             use std::boxed::Box;
             use std::vec::Vec;
         }
-        match_ty_unwrap(ty, &["std", "boxed", "Box"]).and_then(|t| t.head())
+        match_ty_unwrap(ty, &["std", "boxed", "Box"]).and_then(|t| t.first())
           .map(|t| match_ty_unwrap(&**t, &["std", "vec", "Vec"]))
           .map(|_| {
             span_note_and_lint(cx, BOX_VEC, ty.span,