string_lit_as_bytes should also detect "str".to_string().into_bytes()
#6927
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-false-negative
Issue: The lint should have been triggered on code, but wasn't
Lint name:
string_lit_as_bytes
I tried this code:
I expected to see this happen: for the second case (
bytes2
) to also be detected by the lint and recommend using `b"Length" insteadInstead, this happened: only the first case for
bytes1
was detected.This came from real user code we had and manually fixed, would be nice if the lint can be extended to this case as well.
Meta
rustc -Vv
:The text was updated successfully, but these errors were encountered: