@@ -35,7 +35,7 @@ public struct _ArrayBuffer<Element> : _ArrayBufferProtocol {
35
35
36
36
/// Returns an `_ArrayBuffer<U>` containing the same elements.
37
37
///
38
- /// - Requires : The elements actually have dynamic type `U`, and `U`
38
+ /// - Precondition : The elements actually have dynamic type `U`, and `U`
39
39
/// is a class or `@objc` existential.
40
40
@warn_unused_result
41
41
internal func cast< U> ( toBufferOf _: U . Type ) -> _ArrayBuffer < U > {
@@ -51,7 +51,8 @@ public struct _ArrayBuffer<Element> : _ArrayBufferProtocol {
51
51
/// Returns an `_ArrayBuffer<U>` containing the same elements,
52
52
/// deferring checking each element's `U`-ness until it is accessed.
53
53
///
54
- /// - Requires: `U` is a class or `@objc` existential derived from `Element`.
54
+ /// - Precondition: `U` is a class or `@objc` existential derived from
55
+ /// `Element`.
55
56
@warn_unused_result
56
57
internal func downcast< U> (
57
58
toBufferWithDeferredTypeCheckOf _: U . Type
@@ -410,7 +411,7 @@ extension _ArrayBuffer {
410
411
/// Call `body(p)`, where `p` is an `UnsafeMutableBufferPointer`
411
412
/// over the underlying contiguous storage.
412
413
///
413
- /// - Requires : Such contiguous storage exists or the buffer is empty.
414
+ /// - Precondition : Such contiguous storage exists or the buffer is empty.
414
415
public mutating func withUnsafeMutableBufferPointer< R> (
415
416
@noescape body: ( UnsafeMutableBufferPointer < Element > ) throws -> R
416
417
) rethrows -> R {
@@ -430,7 +431,7 @@ extension _ArrayBuffer {
430
431
431
432
/// An object that keeps the elements stored in this buffer alive.
432
433
///
433
- /// - Requires : This buffer is backed by a `_ContiguousArrayBuffer`.
434
+ /// - Precondition : This buffer is backed by a `_ContiguousArrayBuffer`.
434
435
public var nativeOwner : AnyObject {
435
436
_sanityCheck ( _isNative, " Expect a native array " )
436
437
return _native. _storage
@@ -490,7 +491,7 @@ extension _ArrayBuffer {
490
491
491
492
/// Our native representation.
492
493
///
493
- /// - Requires : `_isNative`.
494
+ /// - Precondition : `_isNative`.
494
495
var _native : NativeBuffer {
495
496
return NativeBuffer (
496
497
_isClassOrObjCExistential ( Element . self)
@@ -499,7 +500,7 @@ extension _ArrayBuffer {
499
500
500
501
/// Fast access to the native representation.
501
502
///
502
- /// - Requires : `_isNativeTypeChecked`.
503
+ /// - Precondition : `_isNativeTypeChecked`.
503
504
var _nativeTypeChecked : NativeBuffer {
504
505
return NativeBuffer ( _storage. nativeInstance_noSpareBits)
505
506
}
0 commit comments