[noescape by default] Proliferate @escaping

Adds an explicit @escaping throughout the standard library, validation
test suite, and tests. This will be necessary as soon as noescape is
the default for closure parameters.
This commit is contained in:
Michael Ilseman
2016-07-28 20:28:26 -07:00
parent b4b31908a6
commit ccda8f33d1
27 changed files with 153 additions and 152 deletions

View File

@@ -495,7 +495,7 @@ extension String {
/// Enumerates all the lines in a string.
public func enumerateLines(
invoking body: (line: String, stop: inout Bool) -> ()
invoking body: @escaping (line: String, stop: inout Bool) -> ()
) {
_ns.enumerateLines {
(line: String, stop: UnsafeMutablePointer<ObjCBool>)
@@ -560,7 +560,7 @@ extension String {
public func enumerateSubstrings(
in range: Range<Index>,
options opts: EnumerationOptions = [],
_ body: (
_ body: @escaping (
substring: String?, substringRange: Range<Index>,
enclosingRange: Range<Index>, inout Bool
) -> ()