Skip to content

Commit 04a16df

Browse files
committed
Remove _random cp
1 parent a5e0533 commit 04a16df

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

stdlib/public/core/Integers.swift.gyb

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,10 +2421,6 @@ ${operatorComment(x.operator, False)}
24212421
${assignmentOperatorComment(x.operator, False)}
24222422
static func ${x.operator}=(_ lhs: inout Self, _ rhs: Self)
24232423
% end
2424-
2425-
static func _random<R: RandomNumberGenerator>(
2426-
using generator: inout R
2427-
) -> Self
24282424
}
24292425

24302426
extension FixedWidthInteger {
@@ -3025,6 +3021,7 @@ ${assignmentOperatorComment('&' + x.operator, True)}
30253021
}
30263022

30273023
extension FixedWidthInteger {
3024+
@inlinable
30283025
public static func _random<R: RandomNumberGenerator>(
30293026
using generator: inout R
30303027
) -> Self {
@@ -4045,17 +4042,6 @@ public func _assumeNonNegative(_ x: ${Self}) -> ${Self} {
40454042
}
40464043
% end
40474044

4048-
extension ${Self} {
4049-
@inlinable
4050-
public static func _random<R: RandomNumberGenerator>(
4051-
using generator: inout R
4052-
) -> ${Self} {
4053-
var result: ${Self} = 0
4054-
withUnsafeMutableBytes(of: &result) { generator._fill(bytes: $0) }
4055-
return result
4056-
}
4057-
}
4058-
40594045
//===--- end of FIXME(integers) -------------------------------------------===//
40604046

40614047
% end # end of concrete FixedWidthInteger section

0 commit comments

Comments
 (0)