mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Extend the static diagnostics for exclusivity violations to suggest replacing swap(&collection[index1], &collection[index2] with collection.swapAt(index1, index2). when 'collection' is a MutableCollection. To do so, repurpose some vestigial code that was previously used to suppress all exclusivity diagnostics for calls to swap() and add some additional syntactic, semantic, and textual pattern matching. rdar://problem/31916085
64 KiB
64 KiB