Skip to content

Commit 9847a7b

Browse files
committed
[DO NOT MERGE] Modify Clippy to show lintcheck diff
1 parent 4b8d6b5 commit 9847a7b

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

clippy_lints/src/casts/unnecessary_cast.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub(super) fn check<'tcx>(
5252
UNNECESSARY_CAST,
5353
expr.span,
5454
format!(
55-
"casting raw pointers to the same type and constness is unnecessary (`{cast_from}` -> `{cast_to}`)"
55+
"casting raw pointers to the same type and constness is unnecessary (`{cast_from}` -> `{cast_to}` :D)"
5656
),
5757
"try",
5858
cast_str.clone(),
@@ -166,7 +166,7 @@ pub(super) fn check<'tcx>(
166166
cx,
167167
UNNECESSARY_CAST,
168168
expr.span,
169-
format!("casting to the same type is unnecessary (`{cast_from}` -> `{cast_to}`)"),
169+
format!("casting to the same type is unnecessary (`{cast_from}` -> `{cast_to}`) =^.^="),
170170
"try",
171171
if needs_block {
172172
format!("{{ {cast_str} }}")
@@ -209,7 +209,7 @@ fn lint_unnecessary_cast(
209209
cx,
210210
UNNECESSARY_CAST,
211211
expr.span,
212-
format!("casting {literal_kind_name} literal to `{cast_to}` is unnecessary"),
212+
format!("casting {literal_kind_name} literal to `{cast_to}` is unnecessary UwU"),
213213
"try",
214214
sugg,
215215
Applicability::MachineApplicable,

clippy_lints/src/methods/cloned_instead_of_copied.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![expect(unused)]
12
use clippy_config::msrvs::{self, Msrv};
23
use clippy_utils::diagnostics::span_lint_and_sugg;
34
use clippy_utils::is_trait_method;
@@ -19,13 +20,6 @@ pub fn check(cx: &LateContext<'_>, expr: &Expr<'_>, recv: &Expr<'_>, span: Span,
1920
{
2021
subst.type_at(0)
2122
},
22-
_ if is_trait_method(cx, expr, sym::Iterator) && msrv.meets(msrvs::ITERATOR_COPIED) => {
23-
match get_iterator_item_ty(cx, recv_ty) {
24-
// <T as Iterator>::Item
25-
Some(ty) => ty,
26-
_ => return,
27-
}
28-
},
2923
_ => return,
3024
};
3125
match inner_ty.kind() {

0 commit comments

Comments
 (0)