Skip to content

Commit 3646c32

Browse files
committed
[embedded] Move _CustomStringConvertibleOrNone/_LosslessStringConvertibleOrNone to avoid detaching doccomments from their declarations
1 parent 4430799 commit 3646c32

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

stdlib/public/core/Integers.swift

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,12 @@ extension AdditiveArithmetic {
406406
}
407407
}
408408

409+
#if !$Embedded
410+
public typealias _CustomStringConvertibleOrNone = CustomStringConvertible
411+
#else
412+
public typealias _CustomStringConvertibleOrNone = Any
413+
#endif
414+
409415
//===----------------------------------------------------------------------===//
410416
//===--- BinaryInteger ----------------------------------------------------===//
411417
//===----------------------------------------------------------------------===//
@@ -566,13 +572,6 @@ extension AdditiveArithmetic {
566572
/// print("\(z) is greater than \(x).")
567573
/// }
568574
/// // Prints "23 is greater than -23."
569-
570-
#if !$Embedded
571-
public typealias _CustomStringConvertibleOrNone = CustomStringConvertible
572-
#else
573-
public typealias _CustomStringConvertibleOrNone = Any
574-
#endif
575-
576575
public protocol BinaryInteger :
577576
Hashable, Numeric, _CustomStringConvertibleOrNone, Strideable
578577
where Magnitude: BinaryInteger, Magnitude.Magnitude == Magnitude
@@ -1831,6 +1830,12 @@ extension BinaryInteger {
18311830
}
18321831
}
18331832

1833+
#if !$Embedded
1834+
public typealias _LosslessStringConvertibleOrNone = LosslessStringConvertible
1835+
#else
1836+
public protocol _LosslessStringConvertibleOrNone {}
1837+
#endif
1838+
18341839
//===----------------------------------------------------------------------===//
18351840
//===--- FixedWidthInteger ------------------------------------------------===//
18361841
//===----------------------------------------------------------------------===//
@@ -1899,13 +1904,6 @@ extension BinaryInteger {
18991904
/// customization points for arithmetic operations. When you provide just those
19001905
/// methods, the standard library provides default implementations for all
19011906
/// other arithmetic methods and operators.
1902-
1903-
#if !$Embedded
1904-
public typealias _LosslessStringConvertibleOrNone = LosslessStringConvertible
1905-
#else
1906-
public protocol _LosslessStringConvertibleOrNone {}
1907-
#endif
1908-
19091907
public protocol FixedWidthInteger: BinaryInteger, _LosslessStringConvertibleOrNone
19101908
where Magnitude: FixedWidthInteger & UnsignedInteger,
19111909
Stride: FixedWidthInteger & SignedInteger {

0 commit comments

Comments
 (0)