Skip to content

Commit

Permalink
Rollup merge of rust-lang#114070 - blyxyas:iter_mut_symbol, r=oli-obk
Browse files Browse the repository at this point in the history
Add `sym::iter_mut` + `sym::as_mut_ptr` for Clippy

We currently have `sym::iter` and `sym::iter_repeat`, this PR adds `sym::iter_mut` as it's useful for rust-lang/rust-clippy#11038 and another Clippy lint, it also adds `sym::as_mut_ptr` as it's useful for rust-lang/rust-clippy#10962.
  • Loading branch information
matthiaskrgr authored Jul 26, 2023
2 parents ed2ec81 + 0404b6b commit 8615595
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/methods/bytecount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub(super) fn check<'tcx>(
let haystack = if let ExprKind::MethodCall(path, receiver, [], _) =
filter_recv.kind {
let p = path.ident.name;
if p == sym::iter || p == sym!(iter_mut) {
if p == sym::iter || p == sym::iter_mut {
receiver
} else {
filter_recv
Expand Down

0 comments on commit 8615595

Please sign in to comment.