Skip to content

Commit a77b8ce

Browse files
committed
[stdlib] alter inconsistent declarations
`private` declarations should never be allowed to carry the `@_alwaysEmitIntoClient` attribute. This has been allowed by mistake for a while, but newer compilers should make this an error.
1 parent 384d7f7 commit a77b8ce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stdlib/public/core/CString.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extension String {
7777
}
7878

7979
@_alwaysEmitIntoClient
80-
private init(_checkingCString bytes: UnsafeBufferPointer<UInt8>) {
80+
internal init(_checkingCString bytes: UnsafeBufferPointer<UInt8>) {
8181
guard let length = bytes.firstIndex(of: 0) else {
8282
_preconditionFailure(
8383
"input of String.init(cString:) must be null-terminated"

stdlib/public/core/String.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ extension String {
428428
// check in String(decoding:as:).
429429
@_alwaysEmitIntoClient
430430
@inline(never) // slow-path
431-
private static func _fromNonContiguousUnsafeBitcastUTF8Repairing<
431+
internal static func _fromNonContiguousUnsafeBitcastUTF8Repairing<
432432
C: Collection
433433
>(_ input: C) -> (result: String, repairsMade: Bool) {
434434
_internalInvariant(C.Element.self == UInt8.self)

0 commit comments

Comments
 (0)