Clippy invalid suggestion for format!("{}", &s) #7078
Labels
C-bug
Category: Clippy is not doing the correct thing
good-first-issue
These issues are a good way to get started with Clippy
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
I tried to
clippy --fix
this codeThis fixes to:
But now the different branches have different types. This highlights that the suggested fix even on stable is not correct:
It should suggest
Meta
cargo clippy -V
: clippy 0.1.51 (2fd73fab 2021-03-23)cargo +nightly-x86_64-apple-darwin clippy -V
: clippy 0.1.52 (07e0e2e 2021-03-24)rustc -Vv
:rustc 1.51.0 (2fd73fabe 2021-03-23)
binary: rustc
commit-hash: 2fd73fabe469357a12c2c974c140f67e7cdd76d0
commit-date: 2021-03-23
host: x86_64-apple-darwin
release: 1.51.0
LLVM version: 11.0.1
The text was updated successfully, but these errors were encountered: