Make clippy happy
This commit is contained in:
parent
e5df17aae5
commit
9fd0a415bb
8 changed files with 10 additions and 10 deletions
|
@ -1022,7 +1022,7 @@ fn binding_ty_auto_deref_stability<'tcx>(
|
||||||
))
|
))
|
||||||
.is_sized(cx.tcx, cx.param_env.without_caller_bounds()),
|
.is_sized(cx.tcx, cx.param_env.without_caller_bounds()),
|
||||||
),
|
),
|
||||||
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(..) | TyKind::TraitObject(..) | TyKind::Err => {
|
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(..) | TyKind::TraitObject(..) | TyKind::Err(_) => {
|
||||||
Position::ReborrowStable(precedence)
|
Position::ReborrowStable(precedence)
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -1038,7 +1038,7 @@ fn ty_contains_infer(ty: &hir::Ty<'_>) -> bool {
|
||||||
if self.0
|
if self.0
|
||||||
|| matches!(
|
|| matches!(
|
||||||
ty.kind,
|
ty.kind,
|
||||||
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(_) | TyKind::Err
|
TyKind::OpaqueDef(..) | TyKind::Infer | TyKind::Typeof(_) | TyKind::Err(_)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
self.0 = true;
|
self.0 = true;
|
||||||
|
|
|
@ -224,7 +224,7 @@ fn never_loop_expr(expr: &Expr<'_>, ignore_ids: &mut Vec<HirId>, main_loop_id: H
|
||||||
| ExprKind::Path(_)
|
| ExprKind::Path(_)
|
||||||
| ExprKind::ConstBlock(_)
|
| ExprKind::ConstBlock(_)
|
||||||
| ExprKind::Lit(_)
|
| ExprKind::Lit(_)
|
||||||
| ExprKind::Err => NeverLoopResult::Otherwise,
|
| ExprKind::Err(_) => NeverLoopResult::Otherwise,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -341,7 +341,7 @@ impl<'a, 'tcx> Visitor<'tcx> for SigDropHelper<'a, 'tcx> {
|
||||||
ExprKind::ConstBlock(_) |
|
ExprKind::ConstBlock(_) |
|
||||||
ExprKind::Continue(_) |
|
ExprKind::Continue(_) |
|
||||||
ExprKind::DropTemps(_) |
|
ExprKind::DropTemps(_) |
|
||||||
ExprKind::Err |
|
ExprKind::Err(_) |
|
||||||
ExprKind::InlineAsm(_) |
|
ExprKind::InlineAsm(_) |
|
||||||
ExprKind::Let(_) |
|
ExprKind::Let(_) |
|
||||||
ExprKind::Lit(_) |
|
ExprKind::Lit(_) |
|
||||||
|
|
|
@ -588,7 +588,7 @@ impl<'a, 'tcx> PrintVisitor<'a, 'tcx> {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ExprKind::Err => kind!("Err"),
|
ExprKind::Err(_) => kind!("Err"),
|
||||||
ExprKind::DropTemps(expr) => {
|
ExprKind::DropTemps(expr) => {
|
||||||
bind!(self, expr);
|
bind!(self, expr);
|
||||||
kind!("DropTemps({expr})");
|
kind!("DropTemps({expr})");
|
||||||
|
|
|
@ -193,7 +193,7 @@ fn expr_eagerness<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) -> EagernessS
|
||||||
| ExprKind::Ret(_)
|
| ExprKind::Ret(_)
|
||||||
| ExprKind::InlineAsm(_)
|
| ExprKind::InlineAsm(_)
|
||||||
| ExprKind::Yield(..)
|
| ExprKind::Yield(..)
|
||||||
| ExprKind::Err => {
|
| ExprKind::Err(_) => {
|
||||||
self.eagerness = ForceNoChange;
|
self.eagerness = ForceNoChange;
|
||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
|
|
|
@ -714,7 +714,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
|
||||||
}
|
}
|
||||||
self.hash_pat(pat);
|
self.hash_pat(pat);
|
||||||
},
|
},
|
||||||
ExprKind::Err => {},
|
ExprKind::Err(_) => {},
|
||||||
ExprKind::Lit(ref l) => {
|
ExprKind::Lit(ref l) => {
|
||||||
l.node.hash(&mut self.s);
|
l.node.hash(&mut self.s);
|
||||||
},
|
},
|
||||||
|
@ -986,7 +986,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
|
||||||
TyKind::Typeof(anon_const) => {
|
TyKind::Typeof(anon_const) => {
|
||||||
self.hash_body(anon_const.body);
|
self.hash_body(anon_const.body);
|
||||||
},
|
},
|
||||||
TyKind::Err | TyKind::Infer | TyKind::Never => {},
|
TyKind::Err(_) | TyKind::Infer | TyKind::Never => {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ impl<'a> Sugg<'a> {
|
||||||
| hir::ExprKind::Ret(..)
|
| hir::ExprKind::Ret(..)
|
||||||
| hir::ExprKind::Struct(..)
|
| hir::ExprKind::Struct(..)
|
||||||
| hir::ExprKind::Tup(..)
|
| hir::ExprKind::Tup(..)
|
||||||
| hir::ExprKind::Err => Sugg::NonParen(get_snippet(expr.span)),
|
| hir::ExprKind::Err(_) => Sugg::NonParen(get_snippet(expr.span)),
|
||||||
hir::ExprKind::DropTemps(inner) => Self::hir_from_snippet(inner, get_snippet),
|
hir::ExprKind::DropTemps(inner) => Self::hir_from_snippet(inner, get_snippet),
|
||||||
hir::ExprKind::Assign(lhs, rhs, _) => {
|
hir::ExprKind::Assign(lhs, rhs, _) => {
|
||||||
Sugg::BinOp(AssocOp::Assign, get_snippet(lhs.span), get_snippet(rhs.span))
|
Sugg::BinOp(AssocOp::Assign, get_snippet(lhs.span), get_snippet(rhs.span))
|
||||||
|
|
|
@ -665,7 +665,7 @@ pub fn for_each_unconsumed_temporary<'tcx, B>(
|
||||||
| ExprKind::Path(_)
|
| ExprKind::Path(_)
|
||||||
| ExprKind::Continue(_)
|
| ExprKind::Continue(_)
|
||||||
| ExprKind::InlineAsm(_)
|
| ExprKind::InlineAsm(_)
|
||||||
| ExprKind::Err => (),
|
| ExprKind::Err(_) => (),
|
||||||
}
|
}
|
||||||
ControlFlow::Continue(())
|
ControlFlow::Continue(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue