Skip to content

Commit 4832a85

Browse files
committed
Feed dog
1 parent 180e07e commit 4832a85

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

clippy_lints/src/eta_reduction.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ fn get_ufcs_type_name(
147147
})
148148
}
149149

150-
fn match_borrow_depth(lhs: &ty::Ty<'_>, rhs: &ty::Ty<'_>) -> bool {
150+
fn match_borrow_depth(lhs: ty::Ty<'_>, rhs: ty::Ty<'_>) -> bool {
151151
match (&lhs.sty, &rhs.sty) {
152152
(ty::Ref(_, t1, _), ty::Ref(_, t2, _)) => match_borrow_depth(&t1, &t2),
153153
(l, r) => match (l, r) {
@@ -157,7 +157,7 @@ fn match_borrow_depth(lhs: &ty::Ty<'_>, rhs: &ty::Ty<'_>) -> bool {
157157
}
158158
}
159159

160-
fn match_types(lhs: &ty::Ty<'_>, rhs: &ty::Ty<'_>) -> bool {
160+
fn match_types(lhs: ty::Ty<'_>, rhs: ty::Ty<'_>) -> bool {
161161
match (&lhs.sty, &rhs.sty) {
162162
(ty::Bool, ty::Bool)
163163
| (ty::Char, ty::Char)
@@ -172,7 +172,7 @@ fn match_types(lhs: &ty::Ty<'_>, rhs: &ty::Ty<'_>) -> bool {
172172
}
173173
}
174174

175-
fn get_type_name(cx: &LateContext<'_, '_>, ty: &ty::Ty<'_>) -> String {
175+
fn get_type_name(cx: &LateContext<'_, '_>, ty: ty::Ty<'_>) -> String {
176176
match ty.sty {
177177
ty::Adt(t, _) => cx.tcx.def_path_str(t.did),
178178
ty::Ref(_, r, _) => get_type_name(cx, &r),

clippy_lints/src/utils/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ pub struct AbsolutePathPrinter<'a, 'tcx> {
104104

105105
use rustc::ty::print::Printer;
106106

107+
#[allow(clippy::diverging_sub_expression)]
107108
impl<'tcx> Printer<'tcx, 'tcx> for AbsolutePathPrinter<'_, 'tcx> {
108109
type Error = !;
109110

0 commit comments

Comments
 (0)