about summary refs log tree commit diff
path: root/tests/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorMichael Wright <mikerite@lavabit.com>2019-01-15 08:09:47 +0200
committerMichael Wright <mikerite@lavabit.com>2019-01-15 08:09:47 +0200
commit67a9f20c91fcb7281b46514bd866e353347a4416 (patch)
tree432dcfb14ba3df06762ecb69d23e65d71b9dfcc9 /tests/debuginfo/enum-thinlto.rs
parent19553aee2cef35cb3b3409128f76f3819a43b925 (diff)
downloadrust-67a9f20c91fcb7281b46514bd866e353347a4416.tar.gz
rust-67a9f20c91fcb7281b46514bd866e353347a4416.zip
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/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions