Skip to content

[stdlib] Remove a couple of obsoleted-in-4.0 methods #22123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions stdlib/public/core/MigrationSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -244,26 +244,6 @@ extension String.UnicodeScalarView : _CustomPlaygroundQuickLookable {
}

//===--- Slicing Support --------------------------------------------------===//
// In Swift 3.2, in the absence of type context,
//
// someString.unicodeScalars[
// someString.unicodeScalars.startIndex
// ..< someString.unicodeScalars.endIndex]
//
// was deduced to be of type `String.UnicodeScalarView`. Provide a
// more-specific Swift-3-only `subscript` overload that continues to produce
// `String.UnicodeScalarView`.
extension String.UnicodeScalarView {
@available(swift, obsoleted: 4)
public subscript(bounds: Range<Index>) -> String.UnicodeScalarView {
Builtin.unreachable()
}

@available(swift, obsoleted: 4)
public subscript(bounds: ClosedRange<Index>) -> String.UnicodeScalarView {
Builtin.unreachable()
}
}

// @available(swift,deprecated: 5.0, renamed: "Unicode.UTF8")
public typealias UTF8 = Unicode.UTF8
Expand Down Expand Up @@ -327,11 +307,6 @@ extension Substring {
_precondition(range.upperBound <= endIndex,
"String index range is out of bounds")
}

@available(swift, obsoleted: 4)
public subscript(bounds: ClosedRange<Index>) -> String {
Builtin.unreachable()
}
}

extension Substring : _CustomPlaygroundQuickLookable {
Expand Down Expand Up @@ -567,13 +542,6 @@ extension Sequence {
) rethrows -> [ElementOfResult] {
return try _compactMap(transform)
}

@available(swift, obsoleted: 4)
public func flatMap(
_ transform: (Element) throws -> String
) rethrows -> [String] {
return try map(transform)
}
}

extension Collection {
Expand Down
4 changes: 4 additions & 0 deletions test/api-digester/Outputs/stability-stdlib-abi.swift.expected
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ Protocol SIMD has added inherited protocol Decodable
Protocol SIMD has added inherited protocol Encodable
Protocol SIMD has generic signature change from <τ_0_0 : CustomStringConvertible, τ_0_0 : ExpressibleByArrayLiteral, τ_0_0 : Hashable, τ_0_0 : SIMDStorage, τ_0_0.MaskStorage : SIMD, τ_0_0.MaskStorage.Scalar : FixedWidthInteger, τ_0_0.MaskStorage.Scalar : SignedInteger> to <τ_0_0 : CustomStringConvertible, τ_0_0 : Decodable, τ_0_0 : Encodable, τ_0_0 : ExpressibleByArrayLiteral, τ_0_0 : Hashable, τ_0_0 : SIMDStorage, τ_0_0.MaskStorage : SIMD, τ_0_0.MaskStorage.Scalar : FixedWidthInteger, τ_0_0.MaskStorage.Scalar : SignedInteger>
Protocol SIMDStorage has generic signature change from <τ_0_0.Scalar : Hashable> to <τ_0_0.Scalar : Decodable, τ_0_0.Scalar : Encodable, τ_0_0.Scalar : Hashable>

Func Sequence.flatMap(_:) has been removed
Subscript String.UnicodeScalarView.subscript(_:) has been removed
Subscript Substring.subscript(_:) has been removed