From 80cb48ca1ae5bd4c146d0fdecbd7a87e7359d7ad Mon Sep 17 00:00:00 2001 From: scott-linder Date: Thu, 2 Feb 2017 08:36:40 -0500 Subject: [PATCH] Actually fix the lint applied --- clippy_lints/src/types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index 5918d76a5ff4..5751c5b0e549 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -142,7 +142,7 @@ fn check_ty(cx: &LateContext, ast_ty: &hir::Ty) { match_def_path(cx.tcx, did, &paths::VEC), ], { span_help_and_lint(cx, - BORROWED_BOX, + BOX_VEC, ast_ty.span, "you seem to be trying to use `Box>`. Consider using just `Vec`", "`Vec` is already on the heap, `Box>` makes an extra allocation."); @@ -184,7 +184,7 @@ fn check_ty(cx: &LateContext, ast_ty: &hir::Ty) { if let Some(def_id) = opt_def_id(def) { if Some(def_id) == cx.tcx.lang_items.owned_box() { span_help_and_lint(cx, - BOX_VEC, + BORROWED_BOX, ast_ty.span, "you seem to be trying to use `&Box`. Consider using just `&T`", "replace `&Box` with simply `&T`");