]> git.lizzy.rs Git - rust.git/commitdiff
Actually fix the lint applied
authorscott-linder <scott.b.linder@wmich.edu>
Thu, 2 Feb 2017 13:36:40 +0000 (08:36 -0500)
committerscott-linder <scott.b.linder@wmich.edu>
Sun, 11 Jun 2017 16:19:11 +0000 (12:19 -0400)
clippy_lints/src/types.rs

index 5918d76a5ff4375ab5cacd536c58f1b21df1a457..5751c5b0e5498180b5b945fee02484dc442df8c7 100644 (file)
@@ -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<Vec<T>>`. Consider using just `Vec<T>`",
                                            "`Vec<T>` is already on the heap, `Box<Vec<T>>` 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<T>`. Consider using just `&T`",
                                                "replace `&Box<T>` with simply `&T`");