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