diff options
| author | bors <bors@rust-lang.org> | 2019-01-15 09:04:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-01-15 09:04:09 +0000 |
| commit | 1b89724b4889aef631b40d52c0943bdc28e04d1d (patch) | |
| tree | 54a883b990dcbf6ec10cb70335d93e85577ddc07 /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff | |
| parent | 19553aee2cef35cb3b3409128f76f3819a43b925 (diff) | |
| parent | 89de4c9766eeecd791c789ef63aab9df4b9d906c (diff) | |
| download | rust-1b89724b4889aef631b40d52c0943bdc28e04d1d.tar.gz rust-1b89724b4889aef631b40d52c0943bdc28e04d1d.zip | |
Auto merge of #3662 - mikerite:fix-498, r=oli-obk
Fix `map_clone` bad suggestion `cloned` requires that the elements of the iterator must be references. This change determines if that is the case by examining the type of the closure argument and suggesting `.cloned` only if it is a reference. When the closure argument is not a reference, it suggests removing the `map` call instead. A minor problem with this change is that the new check sometimes overlaps with the `clone_on_copy` lint. Fixes #498
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions
