Skip to content

Commit 2a1f155

Browse files
committed
[stdlib] Use hasFeature(Foo) instead of opaque $Foo syntax
1 parent 776ec74 commit 2a1f155

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/public/core/Optional.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ extension Optional where Wrapped: ~Copyable {
212212
}
213213
}
214214

215-
#if $BorrowingSwitch
215+
#if hasFeature(BorrowingSwitch)
216216
@_alwaysEmitIntoClient
217217
public borrowing func borrowingMap<U: ~Copyable, E: Error>(
218218
_ transform: (borrowing Wrapped) throws(E) -> U
@@ -274,7 +274,7 @@ extension Optional where Wrapped: ~Copyable {
274274
}
275275
}
276276

277-
#if $BorrowingSwitch
277+
#if hasFeature(BorrowingSwitch)
278278
@_alwaysEmitIntoClient
279279
public func borrowingFlatMap<U: ~Copyable, E: Error>(
280280
_ transform: (borrowing Wrapped) throws(E) -> U?
@@ -542,7 +542,7 @@ public struct _OptionalNilComparisonType: ExpressibleByNilLiteral {
542542
}
543543
}
544544

545-
#if $BorrowingSwitch
545+
#if hasFeature(BorrowingSwitch)
546546
extension Optional where Wrapped: ~Copyable {
547547
/// Returns a Boolean value indicating whether an argument matches `nil`.
548548
///

0 commit comments

Comments
 (0)