Skip to content

Commit c599749

Browse files
committed
[stdlib] Remove Strideable closed range operator
1 parent 7531fd3 commit c599749

File tree

3 files changed

+5
-33
lines changed

3 files changed

+5
-33
lines changed

stdlib/public/core/ClosedRange.swift

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -338,38 +338,6 @@ extension Comparable {
338338
}
339339
}
340340

341-
extension Strideable where Stride: SignedInteger {
342-
/// Returns a countable closed range that contains both of its bounds.
343-
///
344-
/// Use the closed range operator (`...`) to create a closed range of any type
345-
/// that conforms to the `Strideable` protocol with an associated signed
346-
/// integer `Stride` type, such as any of the standard library's integer
347-
/// types. This example creates a `ClosedRange<Int>` from zero up to,
348-
/// and including, nine.
349-
///
350-
/// let singleDigits = 0...9
351-
/// print(singleDigits.contains(9))
352-
/// // Prints "true"
353-
///
354-
/// You can use sequence or collection methods on the `singleDigits` range.
355-
///
356-
/// print(singleDigits.count)
357-
/// // Prints "10"
358-
/// print(singleDigits.last)
359-
/// // Prints "9"
360-
///
361-
/// - Parameters:)`.
362-
/// - minimum: The lower bound for the range.
363-
/// - maximum: The upper bound for the range.
364-
@_transparent
365-
public static func ... (minimum: Self, maximum: Self) -> ClosedRange<Self> {
366-
// FIXME: swift-3-indexing-model: tests for traps.
367-
_precondition(
368-
minimum <= maximum, "Can't form Range with upperBound < lowerBound")
369-
return ClosedRange(uncheckedBounds: (lower: minimum, upper: maximum))
370-
}
371-
}
372-
373341
extension ClosedRange: Equatable {
374342
/// Returns a Boolean value indicating whether two ranges are equal.
375343
///

test/api-digester/Outputs/stability-stdlib-abi.swift.expected

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,4 +499,6 @@ Func LazyCollectionProtocol.prefix(while:) has been removed
499499
Func LazyCollectionProtocol.reversed() has been removed
500500
Var LazyCollectionProtocol.lazy has declared type change from LazyCollection<τ_0_0.Elements> to LazySequence<τ_0_0.Elements>
501501

502-
Class __SwiftNativeNSString has been removed
502+
Class __SwiftNativeNSString has been removed
503+
504+
Func Strideable....(_:_:) has been removed

test/api-digester/Outputs/stability-stdlib-source.swift.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,5 @@ Func LazyCollectionProtocol.map(_:) has been removed
210210
Func LazyCollectionProtocol.prefix(while:) has been removed
211211
Func LazyCollectionProtocol.reversed() has been removed
212212
Var LazyCollectionProtocol.lazy has declared type change from LazyCollection<Self.Elements> to LazySequence<Self.Elements>
213+
214+
Func Strideable....(_:_:) has been removed

0 commit comments

Comments
 (0)