mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user