about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-04 15:14:58 +0000
committerbors <bors@rust-lang.org>2022-09-04 15:14:58 +0000
commit46b7cb69cb5bf9ca80d8d70fb7f4686aa28f6723 (patch)
tree2908bbab43b0bb6ac472f00a3a89b807b1615bd8 /src/test/codegen/src-hash-algorithm
parent99ab5fe53a421e0ae3f1d922442fb994bcfcaf24 (diff)
parent750a2d57bde6fca3bbd856410fe4fb54c4c068dc (diff)
downloadrust-46b7cb69cb5bf9ca80d8d70fb7f4686aa28f6723.tar.gz
rust-46b7cb69cb5bf9ca80d8d70fb7f4686aa28f6723.zip
Auto merge of #9424 - mikerite:fix-9351-4, r=xFrednet
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.

changelog: FP: [`unnecessary_to_owned`]: No longer lints, if type change would cause errors in the caller function
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions