diff options
| author | bors <bors@rust-lang.org> | 2022-11-22 12:50:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-22 12:50:08 +0000 |
| commit | 94ce4465e5746bd3ef4d60a16c5aba1e8f0a5b80 (patch) | |
| tree | c71a5ff5c3e69a917578753ef305f09574decdcf /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | f4083c5ae72f5f80bf19e881528c4d39b38db0e7 (diff) | |
| parent | f27ca5c00a96d2dbd1e2b5dceee918d829891bc1 (diff) | |
| download | rust-94ce4465e5746bd3ef4d60a16c5aba1e8f0a5b80.tar.gz rust-94ce4465e5746bd3ef4d60a16c5aba1e8f0a5b80.zip | |
Auto merge of #9796 - smoelius:issue-9771, r=flip1995
Fix #9771 (`unnecessary_to_owned` false positive) Fixes #9771 In that issue's example(s), the lint tried to add a `&` to a value, which implicitly changed the type of a field to a reference. The fix is to add the reference to `receiver_ty` (the type of the receiver of the `to_owned`-like method), before passing `receiver_ty` to `can_change_type`. `can_change_type` properly rejects the modified `receiver_ty`. cc: `@mikerite` just because I think he was the author of `can_change_type`. changelog: fix `unnecessary_to_owned` false positive which implicitly tried to change the type of a field to a reference
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
