Skip to content

Commit dd3d747

Browse files
committed
Fix dogfood
1 parent f3538f1 commit dd3d747

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

clippy_lints/src/dereference.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,18 @@ fn param_auto_deref_stability(ty: Ty<'_>, precedence: i8) -> Position {
911911
ty = ref_ty;
912912
continue;
913913
},
914-
ty::Bool
914+
ty::Infer(_)
915+
| ty::Error(_)
916+
| ty::Param(_)
917+
| ty::Bound(..)
918+
| ty::Opaque(..)
919+
| ty::Placeholder(_)
920+
| ty::Dynamic(..) => Position::ReborrowStable(precedence),
921+
ty::Adt(..) if ty.has_placeholders() || ty.has_param_types_or_consts() => {
922+
Position::ReborrowStable(precedence)
923+
},
924+
ty::Adt(..)
925+
| ty::Bool
915926
| ty::Char
916927
| ty::Int(_)
917928
| ty::Uint(_)
@@ -929,17 +940,6 @@ fn param_auto_deref_stability(ty: Ty<'_>, precedence: i8) -> Position {
929940
| ty::Never
930941
| ty::Tuple(_)
931942
| ty::Projection(_) => Position::DerefStable(precedence),
932-
ty::Infer(_)
933-
| ty::Error(_)
934-
| ty::Param(_)
935-
| ty::Bound(..)
936-
| ty::Opaque(..)
937-
| ty::Placeholder(_)
938-
| ty::Dynamic(..) => Position::ReborrowStable(precedence),
939-
ty::Adt(..) if ty.has_placeholders() || ty.has_param_types_or_consts() => {
940-
Position::ReborrowStable(precedence)
941-
},
942-
ty::Adt(..) => Position::DerefStable(precedence),
943943
};
944944
}
945945
}
@@ -952,7 +952,7 @@ fn ty_contains_field(ty: Ty<'_>, name: Symbol) -> bool {
952952
}
953953
}
954954

955-
#[expect(clippy::needless_pass_by_value)]
955+
#[expect(clippy::needless_pass_by_value, clippy::too_many_lines)]
956956
fn report<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, state: State, data: StateData) {
957957
match state {
958958
State::DerefMethod {

clippy_lints/src/matches/match_same_arms.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ impl<'a> NormalizedPat<'a> {
285285
// TODO: Handle negative integers. They're currently treated as a wild match.
286286
ExprKind::Lit(lit) => match lit.node {
287287
LitKind::Str(sym, _) => Self::LitStr(sym),
288-
LitKind::ByteStr(ref bytes) => Self::LitBytes(&**bytes),
288+
LitKind::ByteStr(ref bytes) => Self::LitBytes(bytes),
289289
LitKind::Byte(val) => Self::LitInt(val.into()),
290290
LitKind::Char(val) => Self::LitInt(val.into()),
291291
LitKind::Int(val, _) => Self::LitInt(val),

clippy_lints/src/matches/match_single_binding.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub(crate) fn check<'a>(cx: &LateContext<'a>, ex: &Expr<'a>, arms: &[Arm<'_>], e
5555
cx,
5656
(ex, expr),
5757
(bind_names, matched_vars),
58-
&*snippet_body,
58+
&snippet_body,
5959
&mut applicability,
6060
Some(span),
6161
);
@@ -88,7 +88,7 @@ pub(crate) fn check<'a>(cx: &LateContext<'a>, ex: &Expr<'a>, arms: &[Arm<'_>], e
8888
cx,
8989
(ex, expr),
9090
(bind_names, matched_vars),
91-
&*snippet_body,
91+
&snippet_body,
9292
&mut applicability,
9393
None,
9494
);

0 commit comments

Comments
 (0)