Underscore @usableFromInlinable symbols (#19686)

This commit is contained in:
Ben Cohen
2018-10-03 12:01:28 -07:00
committed by GitHub
parent 20bb815b62
commit 6cc6f4f182
13 changed files with 455 additions and 470 deletions

View File

@@ -14,9 +14,8 @@
/// `_ArrayBufferProtocol`. This buffer does not provide value semantics.
@usableFromInline
internal protocol _ArrayBufferProtocol
: MutableCollection, RandomAccessCollection {
associatedtype Indices = Range<Int>
: MutableCollection, RandomAccessCollection
where Indices == Range<Int> {
/// Create an empty buffer.
init()
@@ -35,9 +34,6 @@ internal protocol _ArrayBufferProtocol
initializing target: UnsafeMutablePointer<Element>
) -> UnsafeMutablePointer<Element>
/// Get or set the index'th element.
subscript(index: Int) -> Element { get nonmutating set }
/// If this buffer is backed by a uniquely-referenced mutable
/// `_ContiguousArrayBuffer` that can be grown in-place to allow the `self`
/// buffer store `minimumCapacity` elements, returns that buffer.
@@ -121,9 +117,6 @@ internal protocol _ArrayBufferProtocol
/// buffers address the same elements when they have the same
/// identity and count.
var identity: UnsafeRawPointer { get }
var startIndex: Int { get }
var endIndex: Int { get }
}
extension _ArrayBufferProtocol where Indices == Range<Int>{