Skip to content

refactor: apply clippy::explicit_auto_deref#6913

Closed
shulaoda wants to merge 1 commit into
rust-lang:mainfrom
shulaoda:05-23-refactor_apply_clippy_explicit_auto_deref
Closed

refactor: apply clippy::explicit_auto_deref#6913
shulaoda wants to merge 1 commit into
rust-lang:mainfrom
shulaoda:05-23-refactor_apply_clippy_explicit_auto_deref

Conversation

@shulaoda
Copy link
Copy Markdown
Contributor

Summary

  • Removes redundant explicit deref/borrow patterns (&*x, &**x, &***x) across src/expr.rs, src/items.rs, src/reorder.rs, src/types.rs, and src/visitor.rs. The compiler's auto-deref coercion produces the same reference type.
  • Addresses clippy::explicit_auto_deref, run as a single-rule pass: cargo clippy -- -A clippy::all -W clippy::explicit_auto_deref.

Representative changes:

  • contains_skip(&*expr.attrs)contains_skip(&expr.attrs)
  • rewrite_index(&**expr, &**index, …)rewrite_index(expr, index, …)
  • is_same_item_kind(&***ppi)is_same_item_kind(ppi)
  • result.push_str(&*format_visibility(…))result.push_str(&format_visibility(…))

@rustbot rustbot added the S-waiting-on-review Status: awaiting review from the assignee but also interested parties. label May 22, 2026
@ytmimi
Copy link
Copy Markdown
Contributor

ytmimi commented May 22, 2026

Going to close until we decide on which clippy lints we want to enforce in the codebase.

@ytmimi ytmimi closed this May 22, 2026
@rustbot rustbot removed the S-waiting-on-review Status: awaiting review from the assignee but also interested parties. label May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants