Skip to content

Commit 49e0685

Browse files
committed
[noescape by default] drop superfluous @NoEscape from validation suite
1 parent f48471e commit 49e0685

File tree

7 files changed

+28
-28
lines changed

7 files changed

+28
-28
lines changed

validation-test/compiler_crashers_2_fixed/0019-rdar21511651.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extension Sequence
2626
/// If `self` is multi-pass (i.e., a `Collection`), invoke
2727
/// `preprocess` on `self` and return its result. Otherwise, return
2828
/// `nil`.
29-
public func _preprocessingPass<R>(@noescape _ preprocess: (Self) -> R) -> R? {
29+
public func _preprocessingPass<R>(_ preprocess: (Self) -> R) -> R? {
3030
return _base._preprocessingPass { _ in preprocess(self) }
3131
}
3232

validation-test/compiler_crashers_2_fixed/0020-rdar21598514.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ extension LoggingSequenceType {
109109
}
110110

111111
public func map<T>(
112-
@noescape transform: (Base.Iterator.Element) -> T
112+
transform: (Base.Iterator.Element) -> T
113113
) -> [T] {
114114
++SequenceLog.map[selfType]
115115
return base.map(transform)
116116
}
117117

118118
public func filter(
119-
@noescape isIncluded: (Base.Iterator.Element) -> Bool
119+
isIncluded: (Base.Iterator.Element) -> Bool
120120
) -> [Base.Iterator.Element] {
121121
++SequenceLog.filter[selfType]
122122
return base.filter(isIncluded)
@@ -133,7 +133,7 @@ extension LoggingSequenceType {
133133
/// `preprocess` on `self` and return its result. Otherwise, return
134134
/// `nil`.
135135
public func _preprocessingPass<R>(
136-
@noescape _ preprocess: (Self) -> R
136+
_ preprocess: (Self) -> R
137137
) -> R? {
138138
++SequenceLog._preprocessingPass[selfType]
139139
return base._preprocessingPass { _ in preprocess(self) }

validation-test/compiler_crashers_2_fixed/0022-rdar21625478.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ public protocol MySequence {
2020
var underestimatedCount: Int { get }
2121

2222
func map<T>(
23-
_ transform: @noescape (Iterator.Element) -> T
23+
_ transform: (Iterator.Element) -> T
2424
) -> [T]
2525

2626
func filter(
27-
_ isIncluded: @noescape (Iterator.Element) -> Bool
27+
_ isIncluded: (Iterator.Element) -> Bool
2828
) -> [Iterator.Element]
2929

3030
func _customContainsEquatableElement(
3131
_ element: Iterator.Element
3232
) -> Bool?
3333

3434
func _preprocessingPass<R>(
35-
_ preprocess: @noescape (Self) -> R
35+
_ preprocess: (Self) -> R
3636
) -> R?
3737

3838
func _copyToNativeArrayBuffer()
@@ -48,13 +48,13 @@ extension MySequence {
4848
}
4949

5050
public func map<T>(
51-
_ transform: @noescape (Iterator.Element) -> T
51+
_ transform: (Iterator.Element) -> T
5252
) -> [T] {
5353
return []
5454
}
5555

5656
public func filter(
57-
_ isIncluded: @noescape (Iterator.Element) -> Bool
57+
_ isIncluded: (Iterator.Element) -> Bool
5858
) -> [Iterator.Element] {
5959
return []
6060
}
@@ -66,7 +66,7 @@ extension MySequence {
6666
}
6767

6868
public func _preprocessingPass<R>(
69-
_ preprocess: @noescape (Self) -> R
69+
_ preprocess: (Self) -> R
7070
) -> R? {
7171
return nil
7272
}
@@ -111,7 +111,7 @@ extension MyCollection {
111111
return startIndex == endIndex
112112
}
113113
public func _preprocessingPass<R>(
114-
_ preprocess: @noescape (Self) -> R
114+
_ preprocess: (Self) -> R
115115
) -> R? {
116116
return preprocess(self)
117117
}
@@ -249,14 +249,14 @@ extension LoggingSequenceType
249249
}
250250

251251
public func map<T>(
252-
_ transform: @noescape (Base.Iterator.Element) -> T
252+
_ transform: (Base.Iterator.Element) -> T
253253
) -> [T] {
254254
Log.map[selfType] += 1
255255
return base.map(transform)
256256
}
257257

258258
public func filter(
259-
_ isIncluded: @noescape (Base.Iterator.Element) -> Bool
259+
_ isIncluded: (Base.Iterator.Element) -> Bool
260260
) -> [Base.Iterator.Element] {
261261
Log.filter[selfType] += 1
262262
return base.filter(isIncluded)
@@ -273,7 +273,7 @@ extension LoggingSequenceType
273273
/// `preprocess` on `self` and return its result. Otherwise, return
274274
/// `nil`.
275275
public func _preprocessingPass<R>(
276-
_ preprocess: @noescape (Self) -> R
276+
_ preprocess: (Self) -> R
277277
) -> R? {
278278
Log._preprocessingPass[selfType] += 1
279279
return base._preprocessingPass { _ in preprocess(self) }

validation-test/compiler_crashers_2_fixed/0027-rdar21514140.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extension Sequence
2828
/// If `self` is multi-pass (i.e., a `Collection`), invoke
2929
/// `preprocess` on `self` and return its result. Otherwise, return
3030
/// `nil`.
31-
public func _preprocessingPass<R>(@noescape _ preprocess: (Self) -> R) -> R? {
31+
public func _preprocessingPass<R>(_ preprocess: (Self) -> R) -> R? {
3232
return _base._preprocessingPass { _ in preprocess(self) }
3333
}
3434

validation-test/compiler_crashers_2_fixed/0035-rdar22003613.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class CFArray {}
44
struct U<T> {}
55

6-
func yyy<T, Result>(arg: inout T, @noescape _ body: U<T> -> Result) -> Result {
6+
func yyy<T, Result>(arg: inout T, _ body: U<T> -> Result) -> Result {
77
return body(U<T>())
88
}
99

validation-test/stdlib/CollectionType.swift.gyb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ struct MinimalCollectionWith${Implementation}Filter<Element>
105105
}
106106

107107
func filter(
108-
_ isIncluded: @noescape (Element) throws -> Bool
108+
_ isIncluded: (Element) throws -> Bool
109109
) rethrows -> [Element] {
110110
MinimalCollectionWithCustomFilter.timesFilterWasCalled += 1
111111
return try _data.filter(isIncluded)
@@ -119,7 +119,7 @@ struct MinimalCollectionWith${Implementation}Filter<Element>
119119

120120
func callStaticCollectionFilter(
121121
_ sequence: MinimalCollectionWithDefaultFilter<OpaqueValue<Int>>,
122-
_ isIncluded: @noescape (OpaqueValue<Int>) -> Bool
122+
_ isIncluded: (OpaqueValue<Int>) -> Bool
123123
) -> [OpaqueValue<Int>] {
124124
var result = sequence.filter(isIncluded)
125125
expectType([OpaqueValue<Int>].self, &result)
@@ -128,7 +128,7 @@ func callStaticCollectionFilter(
128128

129129
func callStaticCollectionFilter(
130130
_ sequence: MinimalCollectionWithCustomFilter<OpaqueValue<Int>>,
131-
_ isIncluded: @noescape (OpaqueValue<Int>) -> Bool
131+
_ isIncluded: (OpaqueValue<Int>) -> Bool
132132
) -> [OpaqueValue<Int>] {
133133
var result = sequence.filter(isIncluded)
134134
expectType([OpaqueValue<Int>].self, &result)
@@ -137,7 +137,7 @@ func callStaticCollectionFilter(
137137

138138
func callGenericCollectionFilter<S : Collection>(
139139
_ sequence: S,
140-
_ isIncluded: @noescape (S.Iterator.Element) -> Bool
140+
_ isIncluded: (S.Iterator.Element) -> Bool
141141
) -> [S.Iterator.Element] {
142142
var result = sequence.filter(isIncluded)
143143
expectType(Array<S.Iterator.Element>.self, &result)
@@ -241,7 +241,7 @@ struct MinimalCollectionWith${Implementation}Map<Element>
241241
}
242242

243243
func map<T>(
244-
_ transform: @noescape (Element) throws -> T
244+
_ transform: (Element) throws -> T
245245
) rethrows -> [T] {
246246
MinimalCollectionWithCustomMap.timesMapWasCalled += 1
247247
return try _data.map(transform)
@@ -255,7 +255,7 @@ struct MinimalCollectionWith${Implementation}Map<Element>
255255

256256
func callStaticCollectionMap<T>(
257257
_ collection: MinimalCollectionWithDefaultMap<OpaqueValue<Int>>,
258-
transform: @noescape (OpaqueValue<Int>) -> T
258+
transform: (OpaqueValue<Int>) -> T
259259
) -> [T] {
260260
var result = collection.map(transform)
261261
expectType([T].self, &result)
@@ -264,7 +264,7 @@ func callStaticCollectionMap<T>(
264264

265265
func callStaticCollectionMap<T>(
266266
_ collection: MinimalCollectionWithCustomMap<OpaqueValue<Int>>,
267-
transform: @noescape (OpaqueValue<Int>) -> T
267+
transform: (OpaqueValue<Int>) -> T
268268
) -> [T] {
269269
var result = collection.map(transform)
270270
expectType([T].self, &result)
@@ -273,7 +273,7 @@ func callStaticCollectionMap<T>(
273273

274274
func callGenericCollectionMap<C : Collection, T>(
275275
_ collection: C,
276-
transform: @noescape (C.Iterator.Element) -> T
276+
transform: (C.Iterator.Element) -> T
277277
) -> [T] {
278278
var result = collection.map(transform)
279279
expectType([T].self, &result)

validation-test/stdlib/SequenceType.swift.gyb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ struct MinimalSequenceWith${Implementation}Map<Element> : Sequence {
770770
}
771771

772772
func map<T>(
773-
_ transform: @noescape (Element) throws -> T
773+
_ transform: (Element) throws -> T
774774
) rethrows -> [T] {
775775
MinimalSequenceWithCustomMap.timesMapWasCalled += 1
776776
return try _data.map(transform)
@@ -783,7 +783,7 @@ struct MinimalSequenceWith${Implementation}Map<Element> : Sequence {
783783

784784
func callStaticSequenceMap<T>(
785785
_ sequence: MinimalSequenceWithDefaultMap<OpaqueValue<Int>>,
786-
transform: @noescape (OpaqueValue<Int>) -> T
786+
transform: (OpaqueValue<Int>) -> T
787787
) -> [T] {
788788
var result = sequence.map(transform)
789789
expectType([T].self, &result)
@@ -792,7 +792,7 @@ func callStaticSequenceMap<T>(
792792

793793
func callStaticSequenceMap<T>(
794794
_ sequence: MinimalSequenceWithCustomMap<OpaqueValue<Int>>,
795-
transform: @noescape (OpaqueValue<Int>) -> T
795+
transform: (OpaqueValue<Int>) -> T
796796
) -> [T] {
797797
var result = sequence.map(transform)
798798
expectType([T].self, &result)
@@ -801,7 +801,7 @@ func callStaticSequenceMap<T>(
801801

802802
func callGenericSequenceMap<S : Sequence, T>(
803803
_ sequence: S,
804-
transform: @noescape (S.Iterator.Element) -> T
804+
transform: (S.Iterator.Element) -> T
805805
) -> [T] {
806806
var result = sequence.map(transform)
807807
expectType([T].self, &result)

0 commit comments

Comments
 (0)