diff --git a/clippy_lints/src/stable_sort_primitive.rs b/clippy_lints/src/stable_sort_primitive.rs index c08cc9f42419..ec578ffdfacc 100644 --- a/clippy_lints/src/stable_sort_primitive.rs +++ b/clippy_lints/src/stable_sort_primitive.rs @@ -106,8 +106,14 @@ fn is_slice_of_primitives(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { let expr_type = cx.tables().expr_ty_adjusted(expr); match expr_type.kind { ty::Slice(ref element_type) - | ty::Ref(_, ty::TyS { kind: ty::Slice(ref element_type), .. }, _) - => is_primitive_type(element_type), + | ty::Ref( + _, + ty::TyS { + kind: ty::Slice(ref element_type), + .. + }, + _, + ) => is_primitive_type(element_type), _ => false, } }