This commit is contained in:
Michael Wright 2019-02-18 08:32:53 +02:00
parent 6e7a813ed2
commit 9185c8d996

View File

@ -1686,7 +1686,11 @@ fn lint_iter_skip_next(cx: &LateContext<'_, '_>, expr: &hir::Expr) {
}
}
fn derefs_to_slice<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr, ty: Ty<'tcx>) -> Option<&'tcx hir::Expr> {
fn derefs_to_slice<'a, 'tcx>(
cx: &LateContext<'a, 'tcx>,
expr: &'tcx hir::Expr,
ty: Ty<'tcx>,
) -> Option<&'tcx hir::Expr> {
fn may_slice(cx: &LateContext<'_, '_>, ty: Ty<'_>) -> bool {
match ty.sty {
ty::Slice(_) => true,