File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ extension Optional where Wrapped: ~Copyable {
230230 public borrowing func _borrowingMap< U: ~ Copyable, E: Error > (
231231 _ transform: ( borrowing Wrapped ) throws ( E ) -> U
232232 ) throws ( E) -> U ? {
233- #if $NoncopyableGenerics
233+ #if compiler(>=6.0) && $NoncopyableGenerics
234234 switch self {
235235 case . some( _borrowing y) :
236236 return . some( try transform ( y) )
@@ -289,7 +289,6 @@ extension Optional {
289289 }
290290}
291291
292- @_disallowFeatureSuppression ( NoncopyableGenerics)
293292extension Optional where Wrapped: ~ Copyable {
294293 // FIXME(NCG): Make this public.
295294 @_alwaysEmitIntoClient
@@ -309,12 +308,16 @@ extension Optional where Wrapped: ~Copyable {
309308 public func _borrowingFlatMap< U: ~ Copyable, E: Error > (
310309 _ transform: ( borrowing Wrapped ) throws ( E ) -> U ?
311310 ) throws ( E) -> U ? {
311+ #if compiler(>=6.0) && $NoncopyableGenerics
312312 switch self {
313313 case . some( _borrowing y) :
314314 return try transform ( y)
315315 case . none:
316316 return . none
317317 }
318+ #else
319+ fatalError ( " Unsupported compiler " )
320+ #endif
318321 }
319322}
320323
You can’t perform that action at this time.
0 commit comments