about summary refs log tree commit diff
path: root/tests/ui/map_clone.fixed
AgeCommit message (Collapse)AuthorLines
2019-12-22Fix `map_clone` false positiveMichael Wright-0/+10
Don't lint when the item type is not a reference. `copied` only applies to references.
2019-10-03Test fixesShotaro Yamada-1/+1
2019-05-16Also rename the lint in test filesflip1995-1/+1
2019-05-16Split redundant_closure lintMichael Wright-1/+1
Move the method checking into a new lint called `redundant_closures_for_method_calls` and put it in the pedantic group. This aspect of the lint seems more controversial than the rest. cc #3942
2019-04-28Suggest .copied() for map_clone on iterators tooManish Goregaokar-2/+2
2019-04-15Only suggest .copied() for Option right nowManish Goregaokar-4/+4
2019-04-15Also suggest .copied() when .clone() is called on a Copy typeManish Goregaokar-0/+1
2019-04-15Suggest .copied() instead of .cloned() in map_clone when dealing with referencesManish Goregaokar-2/+3
2019-02-10removing redundant closures in the whole projectGrzegorz-0/+1
2019-01-15Fix issue number in `map_clone` testMichael Wright-1/+1
2019-01-15Fix `map_clone` bad suggestionMichael Wright-0/+12
`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
2019-01-13Add run-rustfix to map_clone testWilco Kusee-0/+11