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.");
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`");