This commit is contained in:
Manish Goregaokar 2015-01-07 09:35:34 +05:30
parent 433c834897
commit b7ecb6e7c7
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@ use syntax::ast;
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;

View file

@ -57,7 +57,7 @@ impl LintPass for TypePass {
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,