1
Fork 0

Add BorrowKind::Ref

This commit is contained in:
Manish Goregaokar 2019-11-27 14:30:10 -08:00
parent 6eeac46b91
commit 341e266508
26 changed files with 53 additions and 53 deletions

View file

@ -33,7 +33,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UselessVec {
if_chain! {
if let ty::Ref(_, ty, _) = cx.tables.expr_ty_adjusted(expr).kind;
if let ty::Slice(..) = ty.kind;
if let ExprKind::AddrOf(_, _, ref addressee) = expr.kind;
if let ExprKind::AddrOf(BorrowKind::Ref, _, ref addressee) = expr.kind;
if let Some(vec_args) = higher::vec_macro(cx, addressee);
then {
check_vec_macro(cx, &vec_args, expr.span);