-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
Description
This code :
fn main() {
let x = &[1];
let y = &&[2];
let _ = x.iter().zip(y.into_iter());
}
will suggest to use
let _ = x.iter().zip(&**y);
while it could suggest
let _ = x.iter().zip(*y);
Noticed while closing #11572 as completed.
Version
rustc 1.89.0-nightly (4d051fb30 2025-05-18)
binary: rustc
commit-hash: 4d051fb306e661654d088892e02e69b8c0c39d43
commit-date: 2025-05-18
host: x86_64-unknown-linux-gnu
release: 1.89.0-nightly
LLVM version: 20.1.5
Additional Labels
@rustbot label +good first issue +C-enhancement
The adjustments application could be more subtle and stop when it reaches the right type if no Deref
/DerefMut
adjustment is involved.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy