Skip to content

Commit e740493

Browse files
authored
Merge pull request #1768 from tkremenek/usableFromInline-swift5
Mark _MutablePairHandle and _MutablePair as @usableFromInline
2 parents 2a28954 + 3107383 commit e740493

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Foundation/IndexSet.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,7 @@ extension NSIndexSet : _HasCustomAnyHashableRepresentation {
837837
/// Holds either the immutable or mutable version of a Foundation type.
838838
///
839839
/// In many cases, the immutable type has optimizations which make it preferred when we know we do not need mutation.
840+
@usableFromInline
840841
internal enum _MutablePair<ImmutableType, MutableType> {
841842
case Default(ImmutableType)
842843
case Mutable(MutableType)
@@ -845,6 +846,7 @@ internal enum _MutablePair<ImmutableType, MutableType> {
845846
/// A class type which acts as a handle (pointer-to-pointer) to a Foundation reference type which has both an immutable and mutable class (e.g., NSData, NSMutableData).
846847
///
847848
/// a.k.a. Box
849+
@usableFromInline
848850
internal final class _MutablePairHandle<ImmutableType : NSObject, MutableType : NSObject>
849851
where ImmutableType : NSMutableCopying, MutableType : NSMutableCopying {
850852
@usableFromInline

Foundation/NSCFString.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import CoreFoundation
1212

13+
@usableFromInline
1314
internal class _NSCFString : NSMutableString {
1415
required init(characters: UnsafePointer<unichar>, length: Int) {
1516
fatalError()

0 commit comments

Comments
 (0)