We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92e0e2f commit b1fca3bCopy full SHA for b1fca3b
clippy_lints/src/types.rs
@@ -141,7 +141,7 @@ fn check_ty(cx: &LateContext, ast_ty: &Ty) {
141
match_def_path(cx.tcx, did, &paths::VEC),
142
], {
143
span_help_and_lint(cx,
144
- BORROWED_BOX,
+ BOX_VEC,
145
ast_ty.span,
146
"you seem to be trying to use `Box<Vec<T>>`. Consider using just `Vec<T>`",
147
"`Vec<T>` is already on the heap, `Box<Vec<T>>` makes an extra allocation.");
@@ -183,7 +183,7 @@ fn check_ty(cx: &LateContext, ast_ty: &Ty) {
183
if let Some(def_id) = opt_def_id(def) {
184
if Some(def_id) == cx.tcx.lang_items.owned_box() {
185
186
- BOX_VEC,
+ BORROWED_BOX,
187
188
"you seem to be trying to use `&Box<T>`. Consider using just `&T`",
189
"replace `&Box<T>` with simply `&T`");
0 commit comments