Open
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.
Activity
rustbot commentedon May 19, 2025
Unknown labels: good, first, issue
label
command rust-lang/triagebot#1996samueltardieu commentedon May 19, 2025
@rustbot label +"good first issue"
rustbot commentedon May 19, 2025
Error: Parsing relabel command in comment failed: ...' label +' | error: quote in word at >| '"good firs'...
Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.
useless_conversion
#14864