Merge pull request #11627 from moiseev/swift-2-artifacts

[stdlib] Remove the Grand Renaming artifacts of Swift 3 era
This commit is contained in:
Maxim Moiseev
2017-09-05 11:41:18 -07:00
committed by GitHub
69 changed files with 1551 additions and 4498 deletions

View File

@@ -451,87 +451,3 @@ ${orderingExplanation}
}
}
}
//===--- Unavailable stuff ------------------------------------------------===//
extension MutableCollection where Self : RandomAccessCollection {
@available(*, unavailable, message: "call partition(by:)")
public mutating func partition(
isOrderedBefore: (Element, Element) -> Bool
) -> Index {
Builtin.unreachable()
}
@available(*, unavailable, message: "slice the collection using the range, and call partition(by:)")
public mutating func partition(
_ range: Range<Index>,
isOrderedBefore: (Element, Element) -> Bool
) -> Index {
Builtin.unreachable()
}
}
extension MutableCollection
where Self : RandomAccessCollection, Element : Comparable {
@available(*, unavailable, message: "call partition(by:)")
public mutating func partition() -> Index {
Builtin.unreachable()
}
@available(*, unavailable, message: "slice the collection using the range, and call partition(by:)")
public mutating func partition(_ range: Range<Index>) -> Index {
Builtin.unreachable()
}
}
extension Sequence {
@available(*, unavailable, renamed: "sorted(by:)")
public func sort(
_ isOrderedBefore: (Element, Element) -> Bool
) -> [Element] {
Builtin.unreachable()
}
}
extension Sequence where Element : Comparable {
@available(*, unavailable, renamed: "sorted()")
public func sort() -> [Element] {
Builtin.unreachable()
}
}
extension MutableCollection
where
Self : RandomAccessCollection, Element : Comparable {
@available(*, unavailable, renamed: "sort()")
public mutating func sortInPlace() {
Builtin.unreachable()
}
}
extension MutableCollection where Self : RandomAccessCollection {
@available(*, unavailable, renamed: "sort(by:)")
public mutating func sortInPlace(
_ isOrderedBefore: (Element, Element) -> Bool
) {
Builtin.unreachable()
}
}
extension Collection where Element : Equatable {
@available(*, unavailable, renamed: "index(of:)")
public func indexOf(_ element: Element) -> Index? {
Builtin.unreachable()
}
}
extension Collection {
@available(*, unavailable, renamed: "index(where:)")
public func indexOf(
_ predicate: (Element) throws -> Bool
) rethrows -> Index? {
Builtin.unreachable()
}
}