Auto merge of #4527 - rust-lang:more-vec-diag-items, r=oli-obk

Changed more `Vec` paths to diagnostic_items

In #4519, I missed a few instances of path matching for `Vec`, so here they are.

r? @oli-obk

changelog: none
This commit is contained in:
bors 2019-09-09 16:56:51 +00:00
commit 4ee8bc84cd
3 changed files with 4 additions and 4 deletions

View file

@ -1988,7 +1988,7 @@ fn derefs_to_slice<'a, 'tcx>(
match ty.sty {
ty::Slice(_) => true,
ty::Adt(def, _) if def.is_box() => may_slice(cx, ty.boxed_ty()),
ty::Adt(..) => match_type(cx, ty, &paths::VEC),
ty::Adt(..) => is_type_diagnostic_item(cx, ty, Symbol::intern("vec_type")),
ty::Array(_, size) => size.eval_usize(cx.tcx, cx.param_env) < 32,
ty::Ref(_, inner, _) => may_slice(cx, inner),
_ => false,