Skip to content

Commit b1fdf56

Browse files
committed
stdlib: mark _preprocessingPass with @NoEscape
1 parent 2c20730 commit b1fdf56

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

stdlib/private/StdlibUnittest/LoggingWrappers.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ public struct Logging${Kind}<Base: ${Kind}Type> : ${Kind}Type, LoggingType {
540540
/// `preprocess` on `self` and return its result. Otherwise, return
541541
/// `nil`.
542542
public func _preprocessingPass<R>(
543-
preprocess: (Logging${Kind}) -> R
543+
@noescape preprocess: (Logging${Kind}) -> R
544544
) -> R? {
545545
Log._preprocessingPass[selfType] += 1
546546
return base._preprocessingPass { _ in preprocess(self) }

stdlib/public/core/Collection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ extension SequenceType
605605
}
606606

607607
extension CollectionType {
608-
public func _preprocessingPass<R>(preprocess: (Self) -> R) -> R? {
608+
public func _preprocessingPass<R>(@noescape preprocess: (Self) -> R) -> R? {
609609
return preprocess(self)
610610
}
611611
}

stdlib/public/core/Sequence.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public protocol SequenceType {
189189
/// If `self` is multi-pass (i.e., a `CollectionType`), invoke
190190
/// `preprocess` on `self` and return its result. Otherwise, return
191191
/// `nil`.
192-
func _preprocessingPass<R>(preprocess: (Self) -> R) -> R?
192+
func _preprocessingPass<R>(@noescape preprocess: (Self) -> R) -> R?
193193

194194
/// Create a native array buffer containing the elements of `self`,
195195
/// in the same order.
@@ -516,7 +516,7 @@ extension SequenceType {
516516
return 0
517517
}
518518

519-
public func _preprocessingPass<R>(preprocess: (Self) -> R) -> R? {
519+
public func _preprocessingPass<R>(@noescape preprocess: (Self) -> R) -> R? {
520520
return nil
521521
}
522522

stdlib/public/core/SequenceWrapper.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ extension SequenceType
6161
/// If `self` is multi-pass (i.e., a `CollectionType`), invoke
6262
/// `preprocess` on `self` and return its result. Otherwise, return
6363
/// `nil`.
64-
public func _preprocessingPass<R>(preprocess: (Self) -> R) -> R? {
64+
public func _preprocessingPass<R>(@noescape preprocess: (Self) -> R) -> R? {
6565
return _base._preprocessingPass { _ in preprocess(self) }
6666
}
6767

@@ -137,7 +137,7 @@ extension CollectionType
137137
/// If `self` is multi-pass (i.e., a `CollectionType`), invoke
138138
/// `preprocess` on `self` and return its result. Otherwise, return
139139
/// `nil`.
140-
public func _preprocessingPass<R>(preprocess: (Self) -> R) -> R? {
140+
public func _preprocessingPass<R>(@noescape preprocess: (Self) -> R) -> R? {
141141
return _base._preprocessingPass { _ in preprocess(self) }
142142
}
143143

validation-test/compiler_crashers_2_fixed/0019-rdar21511651.swift

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

validation-test/compiler_crashers_2_fixed/0020-rdar21598514.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ extension LoggingSequenceType {
133133
/// `preprocess` on `self` and return its result. Otherwise, return
134134
/// `nil`.
135135
public func _preprocessingPass<R>(
136-
preprocess: (Self)->R
136+
@noescape 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ extension LoggingSequenceType
146146
/// `preprocess` on `self` and return its result. Otherwise, return
147147
/// `nil`.
148148
public func _preprocessingPass<R>(
149-
preprocess: (Self)->R
149+
@noescape preprocess: (Self) -> R
150150
) -> R? {
151151
++Log._preprocessingPass[selfType]
152152
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
@@ -30,7 +30,7 @@ extension SequenceType
3030
/// If `self` is multi-pass (i.e., a `CollectionType`), invoke
3131
/// `preprocess` on `self` and return its result. Otherwise, return
3232
/// `nil`.
33-
public func _preprocessingPass<R>(preprocess: (Self)->R) -> R? {
33+
public func _preprocessingPass<R>(@noescape preprocess: (Self) -> R) -> R? {
3434
return _base._preprocessingPass { _ in preprocess(self) }
3535
}
3636

0 commit comments

Comments
 (0)