@@ -647,9 +647,8 @@ public struct IndexingIterator<
647
647
/// count the number of contained elements, accessing its `count` property is
648
648
/// an O(*n*) operation.
649
649
public protocol Collection : _Indexable , Sequence
650
- where SubSequence: Collection , Indices: Collection ,
651
- SubSequence. Index == Index ,
652
- SubSequence. Iterator. Element == Iterator . Element
650
+ // FIXME(ABI) (Revert Where Clauses): Restore these
651
+ // where SubSequence: Collection, Indices: Collection,
653
652
{
654
653
/// A type that represents the number of steps between a pair of
655
654
/// indices.
@@ -676,9 +675,15 @@ where SubSequence: Collection, Indices: Collection,
676
675
/// This associated type appears as a requirement in the `Sequence`
677
676
/// protocol, but it is restated here with stricter constraints. In a
678
677
/// collection, the subsequence should also conform to `Collection`.
679
- associatedtype SubSequence = Slice < Self >
680
- where Iterator. Element == SubSequence . Iterator . Element ,
681
- SubSequence. SubSequence == SubSequence
678
+ associatedtype SubSequence
679
+ // FIXME(ABI) (Revert Where Clauses): remove these conformances:
680
+ : _IndexableBase , Sequence
681
+ = Slice < Self >
682
+ where SubSequence. SubSequence == SubSequence
683
+ // FIXME(ABI) (Revert Where Clauses): and this where clause:
684
+ , Iterator. Element == SubSequence . Iterator . Element
685
+ , SubSequence. Index == Index
686
+
682
687
683
688
// FIXME(ABI)#98 (Recursive Protocol Constraints):
684
689
// FIXME(ABI)#99 (Associated Types with where clauses):
@@ -740,10 +745,15 @@ where SubSequence: Collection, Indices: Collection,
740
745
741
746
/// A type that represents the indices that are valid for subscripting the
742
747
/// collection, in ascending order.
743
- associatedtype Indices = DefaultIndices< Self>
744
- where Indices. Iterator . Element == Index,
748
+ associatedtype Indices
749
+ // FIXME(ABI) (Revert Where Clauses): Remove these two conformances
750
+ : _Indexable, Sequence
751
+ = DefaultIndices< Self>
752
+ where Indices. Iterator . Element == Index,
745
753
Indices . Index == Index
746
-
754
+ // FIXME(ABI) (Revert Where Clauses): Remove this where clause
755
+ , Indices . SubSequence == Indices
756
+
747
757
// FIXME(ABI)#100 (Recursive Protocol Constraints):
748
758
// associatedtype Indices : Collection
749
759
// where
0 commit comments