Skip to content

Mark _MutablePairHandle and _MutablePair as @usableFromInline #1768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Foundation/IndexSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@ extension NSIndexSet : _HasCustomAnyHashableRepresentation {
/// Holds either the immutable or mutable version of a Foundation type.
///
/// In many cases, the immutable type has optimizations which make it preferred when we know we do not need mutation.
@usableFromInline
internal enum _MutablePair<ImmutableType, MutableType> {
case Default(ImmutableType)
case Mutable(MutableType)
Expand All @@ -845,6 +846,7 @@ internal enum _MutablePair<ImmutableType, MutableType> {
/// 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).
///
/// a.k.a. Box
@usableFromInline
internal final class _MutablePairHandle<ImmutableType : NSObject, MutableType : NSObject>
where ImmutableType : NSMutableCopying, MutableType : NSMutableCopying {
@usableFromInline
Expand Down
1 change: 1 addition & 0 deletions Foundation/NSCFString.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import CoreFoundation

@usableFromInline
internal class _NSCFString : NSMutableString {
required init(characters: UnsafePointer<unichar>, length: Int) {
fatalError()
Expand Down