about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorMichael Wright <mikerite@lavabit.com>2022-09-03 17:00:44 +0200
committerMichael Wright <mikerite@lavabit.com>2022-09-03 17:00:44 +0200
commit750a2d57bde6fca3bbd856410fe4fb54c4c068dc (patch)
tree2908bbab43b0bb6ac472f00a3a89b807b1615bd8 /src/test/codegen/src-hash-algorithm
parent99ab5fe53a421e0ae3f1d922442fb994bcfcaf24 (diff)
downloadrust-750a2d57bde6fca3bbd856410fe4fb54c4c068dc.tar.gz
rust-750a2d57bde6fca3bbd856410fe4fb54c4c068dc.zip
Fix `unnecessary_to_owned` false positive
Fixes #9351.

Note that this commit reworks that fix for #9317. The change
is to check that the type implements `AsRef<str>` before regarding
`to_string` as an equivalent of `to_owned`. This was suggested
by Jarcho in the #9317 issue comments.

The benefit of this is that it moves some complexity out of
`check_other_call_arg` and simplifies the module as a whole.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions