Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words

This commit is contained in:
Doug Gregor
2015-12-17 11:35:58 -08:00
499 changed files with 5428 additions and 5745 deletions

View File

@@ -11,7 +11,7 @@ import Foundation
@_silgen_name("random") func random() -> UInt32
@_silgen_name("srandomdev") func srandomdev()
protocol TestableUnicodeCodec : UnicodeCodecType {
protocol TestableUnicodeCodec : UnicodeCodec {
typealias CodeUnit : Integer
static func encodingId() -> NSStringEncoding
static func name() -> NSString
@@ -63,7 +63,7 @@ func nthUnicodeScalar(n: UInt32) -> UnicodeScalar {
return UnicodeScalar(r.endIndex - (count - n))
}
}
_preconditionFailure("Index out of range")
_requirementFailure("Index out of range")
}
// `buffer` should have a length >= 4
@@ -74,7 +74,7 @@ func nsEncode<CodeUnit>(
inout _ used: Int
) {
var c = c
_precondition(buffer.count >= 4, "buffer is not large enough")
_require(buffer.count >= 4, "buffer is not large enough")
let s = NSString(
bytes: &c,