1
Fork 0

Enable len_zero for slices

This commit is contained in:
sinkuu 2017-02-25 12:26:33 +09:00
parent 96291e7d1c
commit 5906639af5
4 changed files with 17 additions and 3 deletions

View file

@ -212,7 +212,7 @@ fn has_is_empty(cx: &LateContext, expr: &Expr) -> bool {
},
ty::TyProjection(_) => ty.ty_to_def_id().map_or(false, |id| has_is_empty_impl(cx, id)),
ty::TyAdt(id, _) => has_is_empty_impl(cx, id.did),
ty::TyArray(..) | ty::TyStr => true,
ty::TyArray(..) | ty::TySlice(..) | ty::TyStr => true,
_ => false,
}
}