Use Builtin.unreachable() in unavailable functions.

Saves a bit of code size in the standard library by eliminating some
static strings and function calls.

rdar://problem/25767016
This commit is contained in:
Mark Lacey
2016-05-02 21:30:25 -07:00
parent 5f18de5dd9
commit e03d334b68
35 changed files with 115 additions and 115 deletions

View File

@@ -344,13 +344,13 @@ extension String.CharacterView {
>(
_ subRange: Range<Index>, with newElements: C
) {
fatalError("unavailable function can't be called")
Builtin.unreachable()
}
@available(*, unavailable, renamed: "append(contentsOf:)")
public mutating func appendContentsOf<
S : Sequence where S.Iterator.Element == Character
>(_ newElements: S) {
fatalError("unavailable function can't be called")
Builtin.unreachable()
}
}