Merge pull request #52 from pythonesque/fix_vec

Fix Box<Vec<T>> test.
This commit is contained in:
Manish Goregaokar 2015-05-07 11:23:54 +05:30
commit 4ea4c292f2
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ impl LintPass for TypePass {
use std::vec::Vec;
}
match_ty_unwrap(ty, &["std", "boxed", "Box"]).and_then(|t| t.first())
.map(|t| match_ty_unwrap(&**t, &["std", "vec", "Vec"]))
.and_then(|t| match_ty_unwrap(&**t, &["std", "vec", "Vec"]))
.map(|_| {
span_note_and_lint(cx, BOX_VEC, ty.span,
"You seem to be trying to use Box<Vec<T>>. Did you mean to use Vec<T>?",