Skip to content

Commit 5780f47

Browse files
Remove Strideable closed range operator #20665 (#21252)
1 parent d0d64a1 commit 5780f47

File tree

3 files changed

+4
-32
lines changed

3 files changed

+4
-32
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,3 +600,5 @@ Var String.Index._utf16Index has been removed (deprecated)
600600

601601
Func MutableCollection.withContiguousMutableStorageIfAvailable(_:) has been added as a protocol requirement
602602
Func Sequence.withContiguousStorageIfAvailable(_:) has been added as a protocol requirement
603+
604+
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
@@ -216,3 +216,5 @@ Func Sequence.reduce(into:_:) has parameter 0 changing from Default to Owned
216216

217217
Func MutableCollection.withContiguousMutableStorageIfAvailable(_:) has been added as a protocol requirement
218218
Func Sequence.withContiguousStorageIfAvailable(_:) has been added as a protocol requirement
219+
220+
Func Strideable....(_:_:) has been removed

0 commit comments

Comments
 (0)