Skip to content

Commit 0f4a7d1

Browse files
Make clippy happy
1 parent c0e58c3 commit 0f4a7d1

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

src/tools/clippy/clippy_lints/src/dereference.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ fn binding_ty_auto_deref_stability<'tcx>(
10221022
))
10231023
.is_sized(cx.tcx, cx.param_env.without_caller_bounds()),
10241024
),
1025-
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(..) | TyKind::TraitObject(..) | TyKind::Err => {
1025+
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(..) | TyKind::TraitObject(..) | TyKind::Err(_) => {
10261026
Position::ReborrowStable(precedence)
10271027
},
10281028
};
@@ -1038,7 +1038,7 @@ fn ty_contains_infer(ty: &hir::Ty<'_>) -> bool {
10381038
if self.0
10391039
|| matches!(
10401040
ty.kind,
1041-
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(_) | TyKind::Err
1041+
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(_) | TyKind::Err(_)
10421042
)
10431043
{
10441044
self.0 = true;

src/tools/clippy/clippy_lints/src/loops/never_loop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ fn never_loop_expr(expr: &Expr<'_>, ignore_ids: &mut Vec<HirId>, main_loop_id: H
224224
| ExprKind::Path(_)
225225
| ExprKind::ConstBlock(_)
226226
| ExprKind::Lit(_)
227-
| ExprKind::Err => NeverLoopResult::Otherwise,
227+
| ExprKind::Err(_) => NeverLoopResult::Otherwise,
228228
}
229229
}
230230

src/tools/clippy/clippy_lints/src/matches/significant_drop_in_scrutinee.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ impl<'a, 'tcx> Visitor<'tcx> for SigDropHelper<'a, 'tcx> {
341341
ExprKind::ConstBlock(_) |
342342
ExprKind::Continue(_) |
343343
ExprKind::DropTemps(_) |
344-
ExprKind::Err |
344+
ExprKind::Err(_) |
345345
ExprKind::InlineAsm(_) |
346346
ExprKind::Let(_) |
347347
ExprKind::Lit(_) |

src/tools/clippy/clippy_lints/src/utils/author.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ impl<'a, 'tcx> PrintVisitor<'a, 'tcx> {
588588
},
589589
}
590590
},
591-
ExprKind::Err => kind!("Err"),
591+
ExprKind::Err(_) => kind!("Err"),
592592
ExprKind::DropTemps(expr) => {
593593
bind!(self, expr);
594594
kind!("DropTemps({expr})");

src/tools/clippy/clippy_utils/src/eager_or_lazy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ fn expr_eagerness<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) -> EagernessS
193193
| ExprKind::Ret(_)
194194
| ExprKind::InlineAsm(_)
195195
| ExprKind::Yield(..)
196-
| ExprKind::Err => {
196+
| ExprKind::Err(_) => {
197197
self.eagerness = ForceNoChange;
198198
return;
199199
},

src/tools/clippy/clippy_utils/src/hir_utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
714714
}
715715
self.hash_pat(pat);
716716
},
717-
ExprKind::Err => {},
717+
ExprKind::Err(_) => {},
718718
ExprKind::Lit(ref l) => {
719719
l.node.hash(&mut self.s);
720720
},
@@ -986,7 +986,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
986986
TyKind::Typeof(anon_const) => {
987987
self.hash_body(anon_const.body);
988988
},
989-
TyKind::Err | TyKind::Infer | TyKind::Never => {},
989+
TyKind::Err(_) | TyKind::Infer | TyKind::Never => {},
990990
}
991991
}
992992

src/tools/clippy/clippy_utils/src/sugg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl<'a> Sugg<'a> {
157157
| hir::ExprKind::Ret(..)
158158
| hir::ExprKind::Struct(..)
159159
| hir::ExprKind::Tup(..)
160-
| hir::ExprKind::Err => Sugg::NonParen(get_snippet(expr.span)),
160+
| hir::ExprKind::Err(_) => Sugg::NonParen(get_snippet(expr.span)),
161161
hir::ExprKind::DropTemps(inner) => Self::hir_from_snippet(inner, get_snippet),
162162
hir::ExprKind::Assign(lhs, rhs, _) => {
163163
Sugg::BinOp(AssocOp::Assign, get_snippet(lhs.span), get_snippet(rhs.span))

src/tools/clippy/clippy_utils/src/visitors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ pub fn for_each_unconsumed_temporary<'tcx, B>(
665665
| ExprKind::Path(_)
666666
| ExprKind::Continue(_)
667667
| ExprKind::InlineAsm(_)
668-
| ExprKind::Err => (),
668+
| ExprKind::Err(_) => (),
669669
}
670670
ControlFlow::Continue(())
671671
}

0 commit comments

Comments
 (0)