Suggest removal of .as_str()
when called on a &str
#62642
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given
we currently emit
This is a possible simple WIP mistake when changing some binding from
String
to&str
that we could preempt and avoid a pretty bad suggestion.The text was updated successfully, but these errors were encountered: