Skip to content

Commit d28211d

Browse files
committed
Fix rustup fallout
1 parent 730ca45 commit d28211d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

clippy_lints/src/loops.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ struct FixedOffsetVar<'hir> {
826826
}
827827

828828
fn is_slice_like<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'_>) -> bool {
829-
let is_slice = match ty.kind() {
829+
let is_slice = match ty.kind {
830830
ty::Ref(_, subty, _) => is_slice_like(cx, subty),
831831
ty::Slice(..) | ty::Array(..) => true,
832832
_ => false,
@@ -1403,7 +1403,7 @@ fn is_end_eq_array_len<'tcx>(
14031403
if_chain! {
14041404
if let ExprKind::Lit(ref lit) = end.kind;
14051405
if let ast::LitKind::Int(end_int, _) = lit.node;
1406-
if let ty::Array(_, arr_len_const) = indexed_ty.kind();
1406+
if let ty::Array(_, arr_len_const) = indexed_ty.kind;
14071407
if let Some(arr_len) = arr_len_const.try_eval_usize(cx.tcx, cx.param_env);
14081408
then {
14091409
return match limits {
@@ -1640,7 +1640,7 @@ fn check_for_loop_over_map_kv<'tcx>(
16401640
if let PatKind::Tuple(ref pat, _) = pat.kind {
16411641
if pat.len() == 2 {
16421642
let arg_span = arg.span;
1643-
let (new_pat_span, kind, ty, mutbl) = match *cx.typeck_results().expr_ty(arg).kind() {
1643+
let (new_pat_span, kind, ty, mutbl) = match cx.typeck_results().expr_ty(arg).kind {
16441644
ty::Ref(_, ty, mutbl) => match (&pat[0].kind, &pat[1].kind) {
16451645
(key, _) if pat_is_wild(key, body) => (pat[1].span, "value", ty, mutbl),
16461646
(_, value) if pat_is_wild(value, body) => (pat[0].span, "key", ty, Mutability::Not),
@@ -1968,7 +1968,7 @@ impl<'a, 'tcx> Visitor<'tcx> for VarVisitor<'a, 'tcx> {
19681968
for expr in args {
19691969
let ty = self.cx.typeck_results().expr_ty_adjusted(expr);
19701970
self.prefer_mutable = false;
1971-
if let ty::Ref(_, _, mutbl) = *ty.kind() {
1971+
if let ty::Ref(_, _, mutbl) = ty.kind {
19721972
if mutbl == Mutability::Mut {
19731973
self.prefer_mutable = true;
19741974
}
@@ -1980,7 +1980,7 @@ impl<'a, 'tcx> Visitor<'tcx> for VarVisitor<'a, 'tcx> {
19801980
let def_id = self.cx.typeck_results().type_dependent_def_id(expr.hir_id).unwrap();
19811981
for (ty, expr) in self.cx.tcx.fn_sig(def_id).inputs().skip_binder().iter().zip(args) {
19821982
self.prefer_mutable = false;
1983-
if let ty::Ref(_, _, mutbl) = *ty.kind() {
1983+
if let ty::Ref(_, _, mutbl) = ty.kind {
19841984
if mutbl == Mutability::Mut {
19851985
self.prefer_mutable = true;
19861986
}
@@ -2078,7 +2078,7 @@ fn is_ref_iterable_type(cx: &LateContext<'_>, e: &Expr<'_>) -> bool {
20782078

20792079
fn is_iterable_array<'tcx>(ty: Ty<'tcx>, cx: &LateContext<'tcx>) -> bool {
20802080
// IntoIterator is currently only implemented for array sizes <= 32 in rustc
2081-
match ty.kind() {
2081+
match ty.kind {
20822082
ty::Array(_, n) => n
20832083
.try_eval_usize(cx.tcx, cx.param_env)
20842084
.map_or(false, |val| (0..=32).contains(&val)),

0 commit comments

Comments
 (0)